From ef1a95476ea1bf09ef52e8a535306d99d64194d7 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 9 Apr 2021 19:01:16 +0200 Subject: [PATCH 1/8] update docker base on PT 1.7 --- dockers/nvidia/Dockerfile | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index ad1169c4450dd..94f07c50f6def 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -12,47 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM nvcr.io/nvidia/cuda:11.1.1-runtime-ubuntu20.04 +# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_21-03.html#rel_21-03 +FROM nvcr.io/nvidia/pytorch:20.10-py3 MAINTAINER PyTorchLightning ARG LIGHTNING_VERSION="" SHELL ["/bin/bash", "-c"] -# https://techoverflow.net/2019/05/18/how-to-fix-configuring-tzdata-interactive-input-when-building-docker-images/ -ENV \ - DEBIAN_FRONTEND=noninteractive \ - TZ=Europe/Prague \ - PATH="$PATH:/root/.local/bin" \ - CUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda" \ - MKL_THREADING_LAYER=GNU - -RUN apt-get update -qq && \ - apt-get install -y --no-install-recommends \ - build-essential \ - python3 \ - python3-distutils \ - python3-dev \ - pkg-config \ - cmake \ - git \ - wget \ - unzip \ - ca-certificates \ - && \ - -# Cleaning - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /root/.cache && \ - rm -rf /var/lib/apt/lists/* && \ - -# Setup PIP - update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ - wget https://bootstrap.pypa.io/get-pip.py --progress=bar:force:noscroll --no-check-certificate && \ - python get-pip.py && \ - rm get-pip.py && \ - pip --version COPY ./ /home/pytorch-lightning/ @@ -74,6 +41,7 @@ RUN \ pip install -r ./pytorch-lightning/requirements/extra.txt -U --no-cache-dir && \ pip install -r ./pytorch-lightning/requirements/examples.txt -U --no-cache-dir && \ pip install ./pytorch-lightning --no-cache-dir && \ + pip install "Pillow>=8.1" && \ rm -rf pytorch-lightning RUN python --version && \ From 6c587964bbdf54c4307bfa7cc7e69538c0c10c60 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 10 Apr 2021 00:20:11 +0200 Subject: [PATCH 2/8] fix path --- dockers/nvidia/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index 94f07c50f6def..64c94e38ea672 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -19,12 +19,10 @@ MAINTAINER PyTorchLightning ARG LIGHTNING_VERSION="" -SHELL ["/bin/bash", "-c"] - -COPY ./ /home/pytorch-lightning/ +COPY ./ /workspace/pytorch-lightning/ RUN \ - cd /home && \ + cd /workspace && \ mv pytorch-lightning/notebooks . && \ mv pytorch-lightning/pl_examples . && \ # replace by specific version if asked From d326038f6d73ac4cbcbbc0f32e6825d94a281b56 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 12 Apr 2021 19:53:49 +0200 Subject: [PATCH 3/8] 20.12 --- dockers/nvidia/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index 64c94e38ea672..cded295eafd1a 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. # https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_21-03.html#rel_21-03 -FROM nvcr.io/nvidia/pytorch:20.10-py3 +FROM nvcr.io/nvidia/pytorch:20.12-py3 MAINTAINER PyTorchLightning From b250e2787823ae13a7cfb39f63df802cccc6fb6f Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 12 Apr 2021 20:28:57 +0200 Subject: [PATCH 4/8] ipy --- requirements/examples.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/examples.txt b/requirements/examples.txt index 83ceafe3c2934..785c695d4b9f4 100644 --- a/requirements/examples.txt +++ b/requirements/examples.txt @@ -1,2 +1,3 @@ torchvision>=0.5 gym>=0.17.0 +ipython[all] From 679e86fa9c60c5dbc075137098d19d3c7866ba36 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 12 Apr 2021 21:18:22 +0200 Subject: [PATCH 5/8] pip --- dockers/nvidia/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index cded295eafd1a..a3831ffcf8d42 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -39,7 +39,7 @@ RUN \ pip install -r ./pytorch-lightning/requirements/extra.txt -U --no-cache-dir && \ pip install -r ./pytorch-lightning/requirements/examples.txt -U --no-cache-dir && \ pip install ./pytorch-lightning --no-cache-dir && \ - pip install "Pillow>=8.1" && \ + pip install "Pillow>=8.1" "ipython[all]" --upgrade-strategy only-if-needed && \ rm -rf pytorch-lightning RUN python --version && \ From 9d0c01b161bdfe9abac76212fd6107a0f14b2b62 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 12 Apr 2021 21:29:20 +0200 Subject: [PATCH 6/8] pip --- dockers/nvidia/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index a3831ffcf8d42..10537f5048448 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -39,7 +39,7 @@ RUN \ pip install -r ./pytorch-lightning/requirements/extra.txt -U --no-cache-dir && \ pip install -r ./pytorch-lightning/requirements/examples.txt -U --no-cache-dir && \ pip install ./pytorch-lightning --no-cache-dir && \ - pip install "Pillow>=8.1" "ipython[all]" --upgrade-strategy only-if-needed && \ + pip install "Pillow>=8.1" ipython[all] --no-cache-dir --upgrade-strategy only-if-needed && \ rm -rf pytorch-lightning RUN python --version && \ From eac93a70f9fad6a5c8b6ab58f2d5ef01b49743e5 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 12 Apr 2021 22:27:28 +0200 Subject: [PATCH 7/8] pip --- dockers/nvidia/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index 10537f5048448..19e7498f7f40f 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -36,8 +36,8 @@ RUN \ # Installations python -c "fname = './pytorch-lightning/requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)" && \ - pip install -r ./pytorch-lightning/requirements/extra.txt -U --no-cache-dir && \ - pip install -r ./pytorch-lightning/requirements/examples.txt -U --no-cache-dir && \ + pip install -r ./pytorch-lightning/requirements/extra.txt --no-cache-dir --upgrade-strategy only-if-needed && \ + pip install -r ./pytorch-lightning/requirements/examples.txt --no-cache-dir --upgrade-strategy only-if-needed && \ pip install ./pytorch-lightning --no-cache-dir && \ pip install "Pillow>=8.1" ipython[all] --no-cache-dir --upgrade-strategy only-if-needed && \ rm -rf pytorch-lightning From 8b6a6b3949e82c99b7d0b671469844401145fa38 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 12 Apr 2021 22:44:34 +0200 Subject: [PATCH 8/8] pip --- dockers/nvidia/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index 19e7498f7f40f..6396ab43f65e6 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -39,7 +39,7 @@ RUN \ pip install -r ./pytorch-lightning/requirements/extra.txt --no-cache-dir --upgrade-strategy only-if-needed && \ pip install -r ./pytorch-lightning/requirements/examples.txt --no-cache-dir --upgrade-strategy only-if-needed && \ pip install ./pytorch-lightning --no-cache-dir && \ - pip install "Pillow>=8.1" ipython[all] --no-cache-dir --upgrade-strategy only-if-needed && \ + pip install "Pillow>=8.1" "torchtext>=0.9.0" ipython[all] --no-cache-dir --upgrade-strategy only-if-needed && \ rm -rf pytorch-lightning RUN python --version && \