mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
* Add dockerfile * update README * resolve comments * Remove unnecessary commands * Simplify the dockerfile * enable to specific mmengine version * Update README.md * revert
24 lines
986 B
Docker
24 lines
986 B
Docker
ARG PYTORCH="1.8.1"
|
|
ARG CUDA="10.2"
|
|
ARG CUDNN="7"
|
|
|
|
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
|
|
|
|
# To fix GPG key error when running apt-get update
|
|
RUN rm /etc/apt/sources.list.d/cuda.list \
|
|
&& rm /etc/apt/sources.list.d/nvidia-ml.list \
|
|
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub \
|
|
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
|
|
|
# Install system dependencies for opencv-python
|
|
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install mmengine
|
|
ARG MMENGINE=""
|
|
RUN if [ "${MMENGINE}" = "" ]; then pip install -U openmim && mim install mmengine; else pip install -U openmim && mim install mmengine==${MMENGINE}; fi
|
|
|
|
# Verify the installation
|
|
RUN python -c 'from mmengine.utils.dl_utils import collect_env;print(collect_env())'
|