2024-03-20 11:44:15 +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
|
|
|
|
|
COPY ./requirements.txt /requirements.txt
|
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
|
RUN pip install -r requirements.txt
|
2024-04-16 16:52:25 +08:00
|
|
|
RUN mkdir logs
|
2024-03-20 11:44:15 +08:00
|
|
|
RUN pip install gunicorn
|
|
|
|
|
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
2024-03-20 12:04:25 +08:00
|
|
|
RUN #pip install mmcv==1.4.2 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13/index.html
|
2024-03-20 11:44:15 +08:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY . .
|
|
|
|
|
ENV FLASK_APP=manage.py
|
|
|
|
|
LABEL maintainer="zchengrong@yeah.net" \
|
|
|
|
|
description="My Python 3.9 - trinity aida " \
|
|
|
|
|
version="1.0" \
|
|
|
|
|
name="trinity_aida"
|
|
|
|
|
|
|
|
|
|
|
2024-04-16 15:53:08 +08:00
|
|
|
CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "SR_RABBITMQ_QUEUES=SuperResolution-local" ,"-e", "GI_RABBITMQ_QUEUES=GenerateImage-local"]
|