diff --git a/ci/docker/Dockerfile.build.centos7_gpu b/ci/docker/Dockerfile.build.centos7_gpu index 8bf2442731af..cb3ae82acd05 100644 --- a/ci/docker/Dockerfile.build.centos7_gpu +++ b/ci/docker/Dockerfile.build.centos7_gpu @@ -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 @@ -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/ diff --git a/ci/docker/Dockerfile.build.ubuntu_base_gpu b/ci/docker/Dockerfile.build.ubuntu_base_gpu index 99b79f513bee..94e49b6fb297 100644 --- a/ci/docker/Dockerfile.build.ubuntu_base_gpu +++ b/ci/docker/Dockerfile.build.ubuntu_base_gpu @@ -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/ diff --git a/ci/docker/Dockerfile.build.ubuntu_build_cuda b/ci/docker/Dockerfile.build.ubuntu_build_cuda index 9ed0cbbe3e52..08c67cd660f8 100644 --- a/ci/docker/Dockerfile.build.ubuntu_build_cuda +++ b/ci/docker/Dockerfile.build.ubuntu_build_cuda @@ -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 @@ -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) diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu b/ci/docker/Dockerfile.build.ubuntu_gpu index 8fcbcbbb9674..63fd5973fcd0 100644 --- a/ci/docker/Dockerfile.build.ubuntu_gpu +++ b/ci/docker/Dockerfile.build.ubuntu_gpu @@ -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 @@ -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 diff --git a/ci/docker/Dockerfile.build.ubuntu_nightly_gpu b/ci/docker/Dockerfile.build.ubuntu_nightly_gpu index deeed8b0d52a..934aded5101d 100644 --- a/ci/docker/Dockerfile.build.ubuntu_nightly_gpu +++ b/ci/docker/Dockerfile.build.ubuntu_nightly_gpu @@ -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 @@ -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/ diff --git a/ci/docker/install/centos7_cudnn.sh b/ci/docker/install/centos7_cudnn.sh new file mode 100755 index 000000000000..43ff89b121cc --- /dev/null +++ b/ci/docker/install/centos7_cudnn.sh @@ -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 + diff --git a/ci/docker/install/ubuntu_cudnn.sh b/ci/docker/install/ubuntu_cudnn.sh new file mode 100755 index 000000000000..12b64865a219 --- /dev/null +++ b/ci/docker/install/ubuntu_cudnn.sh @@ -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 + diff --git a/ci/docker/install/ubuntu_nvidia.sh b/ci/docker/install/ubuntu_nvidia.sh index 7012b897ff91..36eb21b8a03e 100755 --- a/ci/docker/install/ubuntu_nvidia.sh +++ b/ci/docker/install/ubuntu_nvidia.sh @@ -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 diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index c3610d2452e0..091ffdf2551d 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -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() { @@ -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 diff --git a/ci/jenkins/Jenkins_steps.groovy b/ci/jenkins/Jenkins_steps.groovy index 12c1a0afc894..1352e92c785f 100644 --- a/ci/jenkins/Jenkins_steps.groovy +++ b/ci/jenkins/Jenkins_steps.groovy @@ -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) } }