Dockerfile 735 B

123456789101112131415161718192021
  1. FROM python:3.9-slim-buster
  2. # RUN sed -i -E "s/\w+.debian.org/mirrors.tuna.tsinghua.edu.cn/g" /etc/apt/sources.list
  3. RUN apt-get update && \
  4. apt-get install -y ffmpeg libsm6 libxext6 && \
  5. apt-get remove --purge -y && rm -rf /var/lib/apt/lists/*
  6. RUN pip install python-multipart
  7. # RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
  8. # pip install python-multipart && \
  9. # pip install diskcache==5.2.1 fastapi==0.65.2 pymilvus==2.1.0 towhee==0.8.0 uvicorn==0.13.4 protobuf==3.20.2 opencv-python==4.6.0.66 torch==1.12.1 torchvision==0.13.1 Pillow==9.2.0 timm==0.6.7 &&\
  10. # pip cache purge
  11. WORKDIR /app/src
  12. ADD . /app
  13. RUN pip install -r requirements.txt
  14. EXPOSE 5000
  15. CMD python3 main.py