2024-01-21 13:48:12 +00:00
|
|
|
FROM python:3.11
|
2023-12-27 23:26:15 +00:00
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED=value
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
COPY requirements.txt ./
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
|
|
|
|
|
|
|
|
RUN apt update && apt install -y ffmpeg libsm6 libxext6
|
|
|
|
|
|
|
|
COPY src .
|
|
|
|
COPY best.pt /best.pt
|
|
|
|
|
2023-12-27 23:59:40 +00:00
|
|
|
RUN chown -R 1000 /usr/src/app
|
|
|
|
RUN mkdir /.config
|
|
|
|
RUN mkdir /.cache
|
|
|
|
RUN chown -R 1000 /.config
|
|
|
|
RUN chown -R 1000 /.cache
|
|
|
|
|
|
|
|
USER 1000
|
|
|
|
|
2023-12-27 23:48:37 +00:00
|
|
|
CMD [ "gunicorn", "-b 0.0.0.0:80", "--workers", "1", "app:app" ]
|