Dockerfile 844 B

123456789101112131415161718192021222324252627
  1. FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime
  2. RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone
  3. WORKDIR /pose
  4. RUN sed -i 's/archive.ubuntu.com/mirrors.nju.edu.cn/g' /etc/apt/sources.list && \
  5. sed -i 's/security.ubuntu.com/mirrors.nju.edu.cn/g' /etc/apt/sources.list && \
  6. apt update && \
  7. apt install -y libgl1-mesa-glx libglib2.0-dev libmysqlclient-dev && \
  8. rm -rf /var/lib/apt/lists/*
  9. COPY requirements.txt .
  10. RUN pip3 install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
  11. # RUN python -m pip install detectron2 --no-cache-dir -i https://mirror.nju.edu.cn/pypi/web/simple -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html
  12. VOLUME /data
  13. COPY . .
  14. CMD ["gunicorn", "app:app"]