Dockerfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. ARG PYTORCH="1.8.1"
  2. ARG CUDA="10.2"
  3. ARG CUDNN="7"
  4. FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
  5. ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX"
  6. ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
  7. ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
  8. # To fix GPG key error when running apt-get update
  9. RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
  10. RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
  11. RUN apt-get update && apt-get install -y git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx\
  12. && apt-get clean \
  13. && rm -rf /var/lib/apt/lists/*
  14. # Install xtcocotools
  15. RUN pip install cython
  16. RUN pip install xtcocotools
  17. # Install MMEngine and MMCV
  18. RUN pip install openmim
  19. RUN mim install mmengine "mmcv>=2.0.0"
  20. # Install MMPose
  21. RUN conda clean --all
  22. RUN git clone https://github.com/open-mmlab/mmpose.git /mmpose
  23. WORKDIR /mmpose
  24. RUN git checkout main
  25. ENV FORCE_CUDA="1"
  26. RUN pip install -r requirements/build.txt
  27. RUN pip install --no-cache-dir -e .