FROM python:3.12 ENV TZ=Asia/Shanghai RUN apt update RUN apt install -y vim RUN apt install -y libgl1-mesa-glx RUN apt install -y poppler-utils RUN apt install -y tesseract-ocr COPY ./requirements.txt /requirements.txt RUN pip install --upgrade pip RUN pip install -r requirements.txt RUN pip install --upgrade grpcio 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 WORKDIR /app COPY . . RUN mkdir -p app/logs RUN mkdir -p app/service/lookbooks/temp_lookbooks ENV FLASK_APP=manage.py LABEL maintainer="zchengrong@yeah.net" \ description="My Python 3.9 - trinity mixi " \ version="1.0" \ name="trinity_mixi" CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app"]