From 277b61d21e296d4d1494b89af027ad28d34f04b9 Mon Sep 17 00:00:00 2001 From: y-okumura-isp Date: Thu, 3 Mar 2022 11:24:09 +0900 Subject: [PATCH] Fix `make docker-build` When running `make docker-build`, the following error occurs. (1) pip no more supports Python 3.6 It looks get-pip.py is updated on 03-Feb-2022 09:45. ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead. The command '/bin/bash -cu curl -O https://bootstrap.pypa.io/get-pip.py && python get-pip.py && rm get-pip.py' returned a non-zero code: 1 Makefile:65: recipe for target 'docker-build' failed make: *** [docker-build] Error 1 (2) NVIDIA apex build failure I got `ATen/cuda/DeviceUtils.cuh: No such file or directory`. As in https://github.com/NVIDIA/apex/issues/1200, I roll back the version. --- docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 25f726ee..33912599 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -75,7 +75,7 @@ RUN if [[ "${PYTHON_VERSION}" == "3.6" ]]; then \ RUN ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python -RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ +RUN curl -O https://bootstrap.pypa.io/pip/3.6/get-pip.py && \ python get-pip.py && \ rm get-pip.py @@ -93,7 +93,7 @@ RUN mkdir /workspace WORKDIR /workspace RUN git clone https://github.com/NVIDIA/apex.git WORKDIR /workspace/apex -RUN pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . +RUN git checkout f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0 && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . ENV PYTHONPATH="/workspace/apex:$PYTHONPATH" WORKDIR /workspace @@ -142,4 +142,4 @@ WORKDIR /workspace/${PROJECT} # Copy project source last (to avoid cache busting) WORKDIR /workspace/${PROJECT} COPY . /workspace/${PROJECT} -ENV PYTHONPATH="/workspace/${PROJECT}:$PYTHONPATH" \ No newline at end of file +ENV PYTHONPATH="/workspace/${PROJECT}:$PYTHONPATH"