From 7ca97d2f47d7fb47aeb8643419b68217f542f611 Mon Sep 17 00:00:00 2001 From: Tarepan Date: Mon, 25 Jan 2021 01:13:57 +0900 Subject: [PATCH 1/2] Fix pip deletion in build-conda --- dockers/base-conda/Dockerfile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/dockers/base-conda/Dockerfile b/dockers/base-conda/Dockerfile index 83c8fe9e7a59b..73f5644a1b38f 100644 --- a/dockers/base-conda/Dockerfile +++ b/dockers/base-conda/Dockerfile @@ -28,6 +28,7 @@ FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu18.04 ARG PYTHON_VERSION=3.7 ARG PYTORCH_VERSION=1.6 +# "pytorch" | "pytorch-nightly" ARG PYTORCH_CHANNEL=pytorch ARG CONDA_VERSION=4.7.12 @@ -98,18 +99,6 @@ ENV CONDA_DEFAULT_ENV=${CONDA_ENV} COPY ./requirements/extra.txt requirements-extra.txt COPY ./requirements/test.txt requirements-test.txt -RUN \ - # Disable cache - pip config set global.cache-dir false && \ - # Drop fairscale for PT <= 1.4 - if [[ $PYTORCH_VERSION < 1.4 ]] ; then \ - python -c "fname = 'requirements-extra.txt' ; lines = [line for line in open(fname).readlines() if 'fairscale' not in line] ; open(fname, 'w').writelines(lines)" ; \ - fi && \ - # Install remaining requirements - pip install -r requirements-extra.txt --upgrade-strategy only-if-needed && \ - pip install -r requirements-test.txt --upgrade-strategy only-if-needed && \ - rm requirements* - RUN \ # install DALI, needed for examples pip install --extra-index-url https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda${CUDA_VERSION%%.*}0 From 38d7715274e35510ea169c1e332adf99865bf99b Mon Sep 17 00:00:00 2001 From: Tarepan Date: Mon, 25 Jan 2021 03:11:36 +0900 Subject: [PATCH 2/2] Fix build-conda with totally pip-less setup --- dockers/base-conda/Dockerfile | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/dockers/base-conda/Dockerfile b/dockers/base-conda/Dockerfile index 73f5644a1b38f..cea9c37b41335 100644 --- a/dockers/base-conda/Dockerfile +++ b/dockers/base-conda/Dockerfile @@ -97,22 +97,4 @@ ENV LD_LIBRARY_PATH="/root/miniconda3/envs/${CONDA_ENV}/lib:$LD_LIBRARY_PATH" ENV CONDA_DEFAULT_ENV=${CONDA_ENV} COPY ./requirements/extra.txt requirements-extra.txt -COPY ./requirements/test.txt requirements-test.txt - -RUN \ - # install DALI, needed for examples - pip install --extra-index-url https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda${CUDA_VERSION%%.*}0 - -RUN \ - # install NVIDIA AMP - git clone https://github.com/NVIDIA/apex && \ - pip install --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./apex && \ - rm -rf apex - -RUN \ - # Show what we have - pip --version && \ - conda info && \ - pip list && \ - python -c "import sys; assert sys.version[:3] == '$PYTHON_VERSION', sys.version" && \ - python -c "import torch; assert torch.__version__[:3] == '$PYTORCH_VERSION', torch.__version__" +COPY ./requirements/test.txt requirements-test.txt \ No newline at end of file