Skip to content

Commit

Permalink
Update base CUDA image for CI to v10.0 cuDNN 7.3.1 (apache#14513)
Browse files Browse the repository at this point in the history
* Updates Ubuntu GPU CI image base image to cuda10-devel and manually installs cuDNN version 7.3.1.20

* Updates CentOS 7 GPU CI image base image to cuda10-devel and manually installs cuDNN version 7.3.1.20
  • Loading branch information
perdasilva authored and haohuw committed Jun 23, 2019
1 parent c72a46e commit b72e4d3
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 10 deletions.
6 changes: 5 additions & 1 deletion ci/docker/Dockerfile.build.centos7_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#
# Dockerfile to build and run MXNet on CentOS 7 for GPU

FROM nvidia/cuda:9.1-cudnn7-devel-centos7
FROM nvidia/cuda:10.0-devel-centos7

ENV CUDNN_VERSION=7.3.1.20

WORKDIR /work/deps

Expand All @@ -28,6 +30,8 @@ COPY install/centos7_ccache.sh /work/
RUN /work/centos7_ccache.sh
COPY install/centos7_python.sh /work/
RUN /work/centos7_python.sh
COPY install/centos7_cudnn.sh /work/
RUN /work/centos7_cudnn.sh

ARG USER_ID=0
COPY install/centos7_adduser.sh /work/
Expand Down
7 changes: 6 additions & 1 deletion ci/docker/Dockerfile.build.ubuntu_base_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
# Dockerfile to run the MXNet Installation Tests on Ubuntu 16.04
# This should run in an empty docker with ubuntu and cuda.

FROM nvidia/cuda:9.1-cudnn7-devel
FROM nvidia/cuda:10.0-devel-ubuntu16.04

ENV CUDNN_VERSION=7.3.1.20

WORKDIR /work/deps

RUN apt-get update && apt-get -y install sudo

COPY install/ubuntu_cudnn.sh /work/
RUN /work/ubuntu_cudnn.sh

ARG USER_ID=0
ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
Expand Down
6 changes: 5 additions & 1 deletion ci/docker/Dockerfile.build.ubuntu_build_cuda
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
# package generation, requiring the actual CUDA library to be
# present

FROM nvidia/cuda:9.1-cudnn7-devel
FROM nvidia/cuda:10.0-devel-ubuntu16.04

ENV CUDNN_VERSION=7.3.1.20

WORKDIR /work/deps

Expand All @@ -43,6 +45,8 @@ COPY install/ubuntu_clang.sh /work/
RUN /work/ubuntu_clang.sh
COPY install/ubuntu_mklml.sh /work/
RUN /work/ubuntu_mklml.sh
COPY install/ubuntu_cudnn.sh /work/
RUN /work/ubuntu_cudnn.sh

# Special case because the CPP-Package requires the CUDA runtime libs
# and not only stubs (which are provided by the base image)
Expand Down
7 changes: 6 additions & 1 deletion ci/docker/Dockerfile.build.ubuntu_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#
# Dockerfile to run MXNet on Ubuntu 16.04 for GPU

FROM nvidia/cuda:9.1-cudnn7-devel
FROM nvidia/cuda:10.0-devel-ubuntu16.04

ENV CUDNN_VERSION=7.3.1.20

WORKDIR /work/deps

Expand Down Expand Up @@ -72,6 +74,9 @@ ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

COPY install/ubuntu_cudnn.sh /work/
RUN /work/ubuntu_cudnn.sh

COPY runtime_functions.sh /work/

WORKDIR /work/mxnet
Expand Down
7 changes: 6 additions & 1 deletion ci/docker/Dockerfile.build.ubuntu_nightly_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#
# Dockerfile to run MXNet on Ubuntu 16.04 for CPU

FROM nvidia/cuda:9.1-cudnn7-devel
FROM nvidia/cuda:10.0-devel-ubuntu16.04

ENV CUDNN_VERSION=7.3.1.20

WORKDIR /work/deps

Expand Down Expand Up @@ -70,6 +72,9 @@ RUN /work/ubuntu_tutorials.sh
COPY install/ubuntu_nightly_tests.sh /work/
RUN /work/ubuntu_nightly_tests.sh

COPY install/ubuntu_cudnn.sh /work/
RUN /work/ubuntu_cudnn.sh

ARG USER_ID=0
ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
Expand Down
32 changes: 32 additions & 0 deletions ci/docker/install/centos7_cudnn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# build and install are separated so changes to build don't invalidate
# the whole docker cache for the image

set -ex

# Multipackage installation does not fail in yum
CUDNN_DOWNLOAD_SUM=4e15a323f2edffa928b4574f696fc0e449a32e6bc35c9ccb03a47af26c2de3fa
curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v7.3.1/cudnn-10.0-linux-x64-v7.3.1.20.tgz -O
echo "$CUDNN_DOWNLOAD_SUM cudnn-10.0-linux-x64-v7.3.1.20.tgz" | sha256sum -c -
tar --no-same-owner -xzf cudnn-10.0-linux-x64-v7.3.1.20.tgz -C /usr/local
rm cudnn-10.0-linux-x64-v7.3.1.20.tgz
ldconfig

29 changes: 29 additions & 0 deletions ci/docker/install/ubuntu_cudnn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# build and install are separated so changes to build don't invalidate
# the whole docker cache for the image

# Assumes base image is from nvidia/cuda

set -ex

apt-get update || true
apt-get install -y libcudnn7=7.3.1.20-1+cuda10.0 libcudnn7-dev=7.3.1.20-1+cuda10.0

2 changes: 1 addition & 1 deletion ci/docker/install/ubuntu_nvidia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ set -ex
# Retrieve ppa:graphics-drivers and install nvidia-drivers.
# Note: DEBIAN_FRONTEND required to skip the interactive setup steps
apt update
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends cuda-9-1
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends cuda-10-0
4 changes: 2 additions & 2 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ build_ubuntu_cpu_mkldnn_mkl() {
}

build_ubuntu_gpu() {
build_ubuntu_gpu_cuda91_cudnn7
build_ubuntu_gpu_cuda100_cudnn7
}

build_ubuntu_gpu_tensorrt() {
Expand Down Expand Up @@ -665,7 +665,7 @@ build_ubuntu_gpu_mkldnn_nocudnn() {
-j$(nproc)
}

build_ubuntu_gpu_cuda91_cudnn7() {
build_ubuntu_gpu_cuda100_cudnn7() {
set -ex
# unfortunately this build has problems in 3rdparty dependencies with ccache and make
# build_ccache_wrappers
Expand Down
4 changes: 2 additions & 2 deletions ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ def compile_unix_mkldnn_nocudnn_gpu() {
}

def compile_unix_full_gpu() {
return ['GPU: CUDA9.1+cuDNN7': {
return ['GPU: CUDA10.0+cuDNN7': {
node(NODE_LINUX_CPU) {
ws('workspace/build-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.docker_run('ubuntu_build_cuda', 'build_ubuntu_gpu_cuda91_cudnn7', false)
utils.docker_run('ubuntu_build_cuda', 'build_ubuntu_gpu_cuda100_cudnn7', false)
utils.pack_lib('gpu', mx_lib_cpp_examples, true)
}
}
Expand Down

0 comments on commit b72e4d3

Please sign in to comment.