diff --git a/dockers/nvidia/Dockerfile b/dockers/nvidia/Dockerfile index ad1169c445..6396ab43f6 100644 --- a/dockers/nvidia/Dockerfile +++ b/dockers/nvidia/Dockerfile @@ -12,52 +12,17 @@ # 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.12-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/ +COPY ./ /workspace/pytorch-lightning/ RUN \ - cd /home && \ + cd /workspace && \ mv pytorch-lightning/notebooks . && \ mv pytorch-lightning/pl_examples . && \ # replace by specific version if asked @@ -71,9 +36,10 @@ 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" "torchtext>=0.9.0" ipython[all] --no-cache-dir --upgrade-strategy only-if-needed && \ rm -rf pytorch-lightning RUN python --version && \ diff --git a/requirements/examples.txt b/requirements/examples.txt index 83ceafe3c2..785c695d4b 100644 --- a/requirements/examples.txt +++ b/requirements/examples.txt @@ -1,2 +1,3 @@ torchvision>=0.5 gym>=0.17.0 +ipython[all]