Skip to content

Commit c548727

Browse files
Jeff YangBordaSeanNaren
authored andcommitted
[dockers] install nvidia-dali-cudaXXX (#4532)
* [dockers] install nvidia-dali-cuda100 * Apply suggestions from code review * build DALI * build DALI * build DALI * dali from source * dali from source * use binaries * qq Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Sean Naren <[email protected]>
1 parent 0dad8e4 commit c548727

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

dockers/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ or with specific arguments
1414
```bash
1515
git clone <git-repository>
1616
docker image build \
17-
-t pytorch-lightning:py3.8 \
18-
-f dockers/conda/Dockerfile \
17+
-t pytorch-lightning:py3.8-pt1.6 \
18+
-f dockers/base-cuda/Dockerfile \
1919
--build-arg PYTHON_VERSION=3.8 \
20-
--build-arg PYTORCH_VERSION=1.4 \
20+
--build-arg PYTORCH_VERSION=1.6 \
2121
.
2222
```
2323

dockers/base-conda/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ SHELL ["/bin/bash", "-c"]
3535

3636
ENV PATH="$PATH:/root/.local/bin"
3737

38-
RUN apt-get update && apt-get install -y --no-install-recommends \
38+
RUN apt-get update -qq && \
39+
apt-get install -y --no-install-recommends \
3940
build-essential \
4041
cmake \
4142
git \
@@ -104,6 +105,7 @@ RUN \
104105
# Install remaining requirements
105106
pip install -r requirements-extra.txt --upgrade-strategy only-if-needed && \
106107
pip install -r requirements-test.txt --upgrade-strategy only-if-needed && \
108+
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda${CUDA_VERSION%%.*}0 && \
107109
rm requirements*
108110

109111
RUN \
@@ -118,4 +120,4 @@ RUN \
118120
conda info && \
119121
pip list && \
120122
python -c "import sys; assert sys.version[:3] == '$PYTHON_VERSION', sys.version" && \
121-
python -c "import torch; assert torch.__version__[:3] == '$PYTORCH_VERSION', torch.__version__"
123+
python -c "import torch; assert torch.__version__[:3] == '$PYTORCH_VERSION', torch.__version__"

dockers/base-cuda/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu18.04
2828

2929
ARG PYTHON_VERSION=3.7
3030
ARG PYTORCH_VERSION=1.6
31+
ARG CMAKE_VERSION=3.18.4
3132

3233
SHELL ["/bin/bash", "-c"]
3334
# https://techoverflow.net/2019/05/18/how-to-fix-configuring-tzdata-interactive-input-when-building-docker-images/
@@ -37,7 +38,7 @@ ENV TZ=Europe/Prague
3738
ENV PATH="$PATH:/root/.local/bin"
3839
ENV CUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda"
3940

40-
RUN apt-get update && \
41+
RUN apt-get update -qq && \
4142
apt-get install -y --no-install-recommends \
4243
build-essential \
4344
pkg-config \
@@ -93,6 +94,7 @@ RUN \
9394

9495
# Install all requirements
9596
pip install -r requirements/devel.txt --upgrade-strategy only-if-needed --use-feature=2020-resolver && \
97+
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda${CUDA_VERSION%%.*}0 && \
9698
rm -rf requirements*
9799

98100
RUN \
@@ -105,5 +107,6 @@ RUN \
105107
# Show what we have
106108
pip --version && \
107109
pip list && \
110+
python -c 'from nvidia.dali.pipeline import Pipeline' && \
108111
python -c "import sys; assert sys.version[:3] == '$PYTHON_VERSION', sys.version" && \
109-
python -c "import torch; assert torch.__version__[:3] == '$PYTORCH_VERSION', torch.__version__"
112+
python -c "import torch; assert torch.__version__[:3] == '$PYTORCH_VERSION', torch.__version__"

dockers/base-xla/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ENV CONDA_ENV=lightning
3131
# show system inforation
3232
RUN lsb_release -a && cat /etc/*-release
3333

34-
RUN apt-get update && \
34+
RUN apt-get update -qq && \
3535
apt-get install -y --no-install-recommends \
3636
build-essential \
3737
cmake \

0 commit comments

Comments
 (0)