fall-detection / dockerfile
Kaelan
ready
d5fbbd4
raw
history blame
2.06 kB
FROM node:21.2-alpine3.17 as build-step
WORKDIR /yolov-app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json package-lock.json ./
COPY ./src ./src
COPY ./public ./public
RUN yarn install
RUN yarn build
FROM python:3.10-bullseye
WORKDIR /yolov-app
COPY --from=build-step /yolov-app/build ./build
COPY . /yolov-app
#RUN cp /yolov-app/public/uploads/cafe_fall.mp4 /yolov-app/build/static/cafe_fall.mp4
#RUN cp /yolov-app/public/uploads/kitchen.mp4 /yolov-app/build/static/kitchen.mp4
#RUN cp /yolov-app/public/uploads/skate.mp4 /yolov-app/build/static/skate.mp4
#RUN cp /yolov-app/public/uploads/slip.mp4 /yolov-app/build/static/slip.mp4
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& pip install --upgrade pip \
&& apt clean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN gdown https://drive.google.com/file/d/1lBlZEh0v-WVUJsBb3ZJcUG8zxe5cckWT/view?usp=sharing --fuzzy -O checkpoints/
#ckpt.t7
RUN gdown https://drive.google.com/file/d/14T5lpdJ0dPndYkMKr0sUcSq_myQDQSda/view?usp=sharing --fuzzy -O checkpoints/best181-8376/
#ckpt_latest.pth
RUN gdown https://drive.google.com/file/d/1pIDLMr0UUj_6fWYf9xHJ1lcKcCgmO7Vv/view?usp=sharing --fuzzy -O build/static/
#kitchen.mp4
RUN gdown https://drive.google.com/file/d/1ip07Lngcicd7pouKs_b0OhpVVoVFRC7U/view?usp=sharing --fuzzy -O build/static/
#slip.mp4
RUN gdown https://drive.google.com/file/d/1s93CZeEKEp_SwO5Y4KOjNYK0zWBgNiy7/view?usp=sharing --fuzzy -O build/static/
#studycam.mp4
RUN gdown https://drive.google.com/file/d/1lZNim3Sl_dQN6gcyEvddRLeijM6v-pO5/view?usp=sharing --fuzzy -O build/static/
#cafe_fall.mp4
RUN gdown https://drive.google.com/file/d/1Ru6ARgQOtshVgSUosFiH7GFRyRM-_R5U/view?usp=sharing --fuzzy -O build/static/
#skate.mp4
EXPOSE 5000
EXPOSE 3000
EXPOSE 7860
WORKDIR /yolov-app
CMD ["gunicorn", "-w", "4", "--timeout", "240", "-b", "0.0.0.0:5000", "main:app"]