|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -FROM nvcr.io/nvidia/cuda:11.1.1-runtime-ubuntu20.04 |
| 15 | +# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_21-03.html#rel_21-03 |
| 16 | +FROM nvcr.io/nvidia/pytorch:20.12-py3 |
16 | 17 |
|
17 | 18 | MAINTAINER PyTorchLightning <https://github.com/PyTorchLightning> |
18 | 19 |
|
19 | 20 | ARG LIGHTNING_VERSION="" |
20 | 21 |
|
21 | | -SHELL ["/bin/bash", "-c"] |
22 | | -# https://techoverflow.net/2019/05/18/how-to-fix-configuring-tzdata-interactive-input-when-building-docker-images/ |
23 | | -ENV \ |
24 | | - DEBIAN_FRONTEND=noninteractive \ |
25 | | - TZ=Europe/Prague \ |
26 | | - PATH="$PATH:/root/.local/bin" \ |
27 | | - CUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda" \ |
28 | | - MKL_THREADING_LAYER=GNU |
29 | | - |
30 | | -RUN apt-get update -qq && \ |
31 | | - apt-get install -y --no-install-recommends \ |
32 | | - build-essential \ |
33 | | - python3 \ |
34 | | - python3-distutils \ |
35 | | - python3-dev \ |
36 | | - pkg-config \ |
37 | | - cmake \ |
38 | | - git \ |
39 | | - wget \ |
40 | | - unzip \ |
41 | | - ca-certificates \ |
42 | | - && \ |
43 | | - |
44 | | -# Cleaning |
45 | | - apt-get autoremove -y && \ |
46 | | - apt-get clean && \ |
47 | | - rm -rf /root/.cache && \ |
48 | | - rm -rf /var/lib/apt/lists/* && \ |
49 | | - |
50 | | -# Setup PIP |
51 | | - update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ |
52 | | - wget https://bootstrap.pypa.io/get-pip.py --progress=bar:force:noscroll --no-check-certificate && \ |
53 | | - python get-pip.py && \ |
54 | | - rm get-pip.py && \ |
55 | | - pip --version |
56 | | - |
57 | | -COPY ./ /home/pytorch-lightning/ |
| 22 | +COPY ./ /workspace/pytorch-lightning/ |
58 | 23 |
|
59 | 24 | RUN \ |
60 | | - cd /home && \ |
| 25 | + cd /workspace && \ |
61 | 26 | mv pytorch-lightning/notebooks . && \ |
62 | 27 | mv pytorch-lightning/pl_examples . && \ |
63 | 28 | # replace by specific version if asked |
|
71 | 36 |
|
72 | 37 | # Installations |
73 | 38 | 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)" && \ |
74 | | - pip install -r ./pytorch-lightning/requirements/extra.txt -U --no-cache-dir && \ |
75 | | - pip install -r ./pytorch-lightning/requirements/examples.txt -U --no-cache-dir && \ |
| 39 | + pip install -r ./pytorch-lightning/requirements/extra.txt --no-cache-dir --upgrade-strategy only-if-needed && \ |
| 40 | + pip install -r ./pytorch-lightning/requirements/examples.txt --no-cache-dir --upgrade-strategy only-if-needed && \ |
76 | 41 | pip install ./pytorch-lightning --no-cache-dir && \ |
| 42 | + pip install "Pillow>=8.1" "torchtext>=0.9.0" ipython[all] --no-cache-dir --upgrade-strategy only-if-needed && \ |
77 | 43 | rm -rf pytorch-lightning |
78 | 44 |
|
79 | 45 | RUN python --version && \ |
|
0 commit comments