Skip to content

Commit c348bfc

Browse files
Bordaawaelchli
authored andcommitted
update docker base on PT 1.7 (#6931)
* update docker base on PT 1.7 * fix path (cherry picked from commit da1ac3a)
1 parent 25b4075 commit c348bfc

File tree

2 files changed

+8
-41
lines changed

2 files changed

+8
-41
lines changed

dockers/nvidia/Dockerfile

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

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
1617

1718
MAINTAINER PyTorchLightning <https://github.com/PyTorchLightning>
1819

1920
ARG LIGHTNING_VERSION=""
2021

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/
5823

5924
RUN \
60-
cd /home && \
25+
cd /workspace && \
6126
mv pytorch-lightning/notebooks . && \
6227
mv pytorch-lightning/pl_examples . && \
6328
# replace by specific version if asked
@@ -71,9 +36,10 @@ RUN \
7136

7237
# Installations
7338
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 && \
7641
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 && \
7743
rm -rf pytorch-lightning
7844

7945
RUN python --version && \

requirements/examples.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
torchvision>=0.5
22
gym>=0.17.0
3+
ipython[all]

0 commit comments

Comments
 (0)