2024-03-18 14:40:46 +08:00
|
|
|
FROM python:3.9
|
|
|
|
|
ENV TZ=Asia/Shanghai
|
|
|
|
|
RUN apt update
|
|
|
|
|
RUN apt install -y vim
|
|
|
|
|
RUN apt install -y libgl1-mesa-glx
|
2024-10-21 11:41:52 +08:00
|
|
|
RUN apt install -y poppler-utils
|
2024-10-21 12:03:05 +08:00
|
|
|
RUN apt install -y tesseract-ocr
|
2024-10-21 11:40:34 +08:00
|
|
|
|
2024-03-18 14:40:46 +08:00
|
|
|
COPY ./requirements.txt /requirements.txt
|
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
RUN pip install gunicorn
|
|
|
|
|
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
|
|
|
|
RUN pip install mmcv==1.4.2 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13/index.html
|
2024-10-21 22:42:42 +08:00
|
|
|
|
2024-03-18 14:40:46 +08:00
|
|
|
WORKDIR /app
|
|
|
|
|
COPY . .
|
2024-10-21 11:34:44 +08:00
|
|
|
RUN mkdir -p app/logs
|
|
|
|
|
RUN mkdir -p app/service/lookbooks/temp_lookbooks
|
2024-03-18 14:40:46 +08:00
|
|
|
ENV FLASK_APP=manage.py
|
|
|
|
|
LABEL maintainer="zchengrong@yeah.net" \
|
|
|
|
|
description="My Python 3.9 - trinity mixi " \
|
|
|
|
|
version="1.0" \
|
|
|
|
|
name="trinity_mixi"
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 16:11:06 +08:00
|
|
|
CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app"]
|