diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu b/ci/docker/Dockerfile.build.ubuntu_gpu_cu100 similarity index 100% rename from ci/docker/Dockerfile.build.ubuntu_gpu rename to ci/docker/Dockerfile.build.ubuntu_gpu_cu100 diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu_cu80 b/ci/docker/Dockerfile.build.ubuntu_gpu_cu80 new file mode 100644 index 000000000000..9c7a8084b093 --- /dev/null +++ b/ci/docker/Dockerfile.build.ubuntu_gpu_cu80 @@ -0,0 +1,78 @@ +# -*- mode: dockerfile -*- +# 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. +# +# Dockerfile to run MXNet on Ubuntu 16.04 for GPU + +FROM nvidia/cuda:8.0-cudnn7-devel-ubuntu16.04 + +WORKDIR /work/deps + +COPY install/ubuntu_core.sh /work/ +RUN /work/ubuntu_core.sh + +COPY install/deb_ubuntu_ccache.sh /work/ +RUN /work/deb_ubuntu_ccache.sh + +COPY install/ubuntu_python.sh /work/ +RUN /work/ubuntu_python.sh + +COPY install/ubuntu_scala.sh /work/ +COPY install/sbt.gpg /work/ +RUN /work/ubuntu_scala.sh + +COPY install/ubuntu_r.sh /work/ +COPY install/r.gpg /work/ +RUN /work/ubuntu_r.sh + +COPY install/ubuntu_perl.sh /work/ +RUN /work/ubuntu_perl.sh + +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_tvm.sh /work/ +RUN /work/ubuntu_tvm.sh + +COPY install/ubuntu_llvm.sh /work/ +RUN /work/ubuntu_llvm.sh + +COPY install/ubuntu_caffe.sh /work/ +RUN /work/ubuntu_caffe.sh + +COPY install/ubuntu_onnx.sh /work/ +RUN /work/ubuntu_onnx.sh + +COPY install/ubuntu_docs.sh /work/ +COPY install/docs_requirements /work/ +RUN /work/ubuntu_docs.sh + +COPY install/ubuntu_tutorials.sh /work/ +RUN /work/ubuntu_tutorials.sh + +ARG USER_ID=0 +ARG GROUP_ID=0 +COPY install/ubuntu_adduser.sh /work/ +RUN /work/ubuntu_adduser.sh + +COPY runtime_functions.sh /work/ + +WORKDIR /work/mxnet +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu_cu90 b/ci/docker/Dockerfile.build.ubuntu_gpu_cu90 new file mode 100644 index 000000000000..f1e6570f03b9 --- /dev/null +++ b/ci/docker/Dockerfile.build.ubuntu_gpu_cu90 @@ -0,0 +1,83 @@ +# -*- mode: dockerfile -*- +# 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. +# +# Dockerfile to run MXNet on Ubuntu 16.04 for GPU + +FROM nvidia/cuda:9.0-devel-ubuntu16.04 + +ENV CUDNN_VERSION=7.3.1.20 + +WORKDIR /work/deps + +COPY install/ubuntu_core.sh /work/ +RUN /work/ubuntu_core.sh + +COPY install/deb_ubuntu_ccache.sh /work/ +RUN /work/deb_ubuntu_ccache.sh + +COPY install/ubuntu_python.sh /work/ +RUN /work/ubuntu_python.sh + +COPY install/ubuntu_scala.sh /work/ +COPY install/sbt.gpg /work/ +RUN /work/ubuntu_scala.sh + +COPY install/ubuntu_r.sh /work/ +COPY install/r.gpg /work/ +RUN /work/ubuntu_r.sh + +COPY install/ubuntu_perl.sh /work/ +RUN /work/ubuntu_perl.sh + +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_tvm.sh /work/ +RUN /work/ubuntu_tvm.sh + +COPY install/ubuntu_llvm.sh /work/ +RUN /work/ubuntu_llvm.sh + +COPY install/ubuntu_caffe.sh /work/ +RUN /work/ubuntu_caffe.sh + +COPY install/ubuntu_onnx.sh /work/ +RUN /work/ubuntu_onnx.sh + +COPY install/ubuntu_docs.sh /work/ +COPY install/docs_requirements /work/ +RUN /work/ubuntu_docs.sh + +COPY install/ubuntu_tutorials.sh /work/ +RUN /work/ubuntu_tutorials.sh + +ARG USER_ID=0 +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 +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu_cu92 b/ci/docker/Dockerfile.build.ubuntu_gpu_cu92 new file mode 100644 index 000000000000..81b337e4d9a7 --- /dev/null +++ b/ci/docker/Dockerfile.build.ubuntu_gpu_cu92 @@ -0,0 +1,83 @@ +# -*- mode: dockerfile -*- +# 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. +# +# Dockerfile to run MXNet on Ubuntu 16.04 for GPU + +FROM nvidia/cuda:9.2-devel-ubuntu16.04 + +ENV CUDNN_VERSION=7.3.1.20 + +WORKDIR /work/deps + +COPY install/ubuntu_core.sh /work/ +RUN /work/ubuntu_core.sh + +COPY install/deb_ubuntu_ccache.sh /work/ +RUN /work/deb_ubuntu_ccache.sh + +COPY install/ubuntu_python.sh /work/ +RUN /work/ubuntu_python.sh + +COPY install/ubuntu_scala.sh /work/ +COPY install/sbt.gpg /work/ +RUN /work/ubuntu_scala.sh + +COPY install/ubuntu_r.sh /work/ +COPY install/r.gpg /work/ +RUN /work/ubuntu_r.sh + +COPY install/ubuntu_perl.sh /work/ +RUN /work/ubuntu_perl.sh + +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_tvm.sh /work/ +RUN /work/ubuntu_tvm.sh + +COPY install/ubuntu_llvm.sh /work/ +RUN /work/ubuntu_llvm.sh + +COPY install/ubuntu_caffe.sh /work/ +RUN /work/ubuntu_caffe.sh + +COPY install/ubuntu_onnx.sh /work/ +RUN /work/ubuntu_onnx.sh + +COPY install/ubuntu_docs.sh /work/ +COPY install/docs_requirements /work/ +RUN /work/ubuntu_docs.sh + +COPY install/ubuntu_tutorials.sh /work/ +RUN /work/ubuntu_tutorials.sh + +ARG USER_ID=0 +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 +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib diff --git a/ci/docker/install/ubuntu_cudnn.sh b/ci/docker/install/ubuntu_cudnn.sh index 12b64865a219..3f649074f4d5 100755 --- a/ci/docker/install/ubuntu_cudnn.sh +++ b/ci/docker/install/ubuntu_cudnn.sh @@ -24,6 +24,31 @@ set -ex +if [ -z ${CUDNN_VERSION} ]; then + echo "Error: CUDNN_VERSION environment variable undefiend" + exit 1 +fi + 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 + +case ${CUDA_VERSION} in + 10\.0*) + export libcudnn7_version="${CUDNN_VERSION}-1+cuda10.0" + export libcudnn7_dev_version="${CUDNN_VERSION}-1+cuda10.0" + ;; + 9\.0*) + export libcudnn7_version="${CUDNN_VERSION}-1+cuda9.0" + export libcudnn7_dev_version="${CUDNN_VERSION}-1+cuda9.0" + ;; + 9\.2*) + export libcudnn7_version="${CUDNN_VERSION}-1+cuda9.2" + export libcudnn7_dev_version="${CUDNN_VERSION}-1+cuda9.2" + ;; + *) + echo "Unsupported CUDA version ${CUDA_VERSION}" + exit 1 + ;; +esac + +apt-get install -y libcudnn7=${libcudnn7_version} libcudnn7-dev=${libcudnn7_dev_version} diff --git a/ci/jenkins/Jenkins_steps.groovy b/ci/jenkins/Jenkins_steps.groovy index 1352e92c785f..2c86cf740a80 100644 --- a/ci/jenkins/Jenkins_steps.groovy +++ b/ci/jenkins/Jenkins_steps.groovy @@ -139,7 +139,7 @@ def compile_unix_int64_gpu() { ws('workspace/build-gpu-int64') { timeout(time: max_time, unit: 'MINUTES') { utils.init_git() - utils.docker_run('ubuntu_gpu', 'build_ubuntu_gpu_large_tensor', false) + utils.docker_run('ubuntu_gpu_cu100', 'build_ubuntu_gpu_large_tensor', false) utils.pack_lib('ubuntu_gpu_int64', mx_cmake_lib, true) } } @@ -237,7 +237,7 @@ def compile_unix_cmake_mkldnn_gpu() { ws('workspace/build-cmake-mkldnn-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.init_git() - utils.docker_run('ubuntu_gpu', 'build_ubuntu_gpu_cmake_mkldnn', false) + utils.docker_run('ubuntu_gpu_cu100', 'build_ubuntu_gpu_cmake_mkldnn', false) utils.pack_lib('cmake_mkldnn_gpu', mx_cmake_mkldnn_lib, true) } } @@ -251,7 +251,7 @@ def compile_unix_cmake_gpu() { ws('workspace/build-cmake-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.init_git() - utils.docker_run('ubuntu_gpu', 'build_ubuntu_gpu_cmake', false) + utils.docker_run('ubuntu_gpu_cu100', 'build_ubuntu_gpu_cmake', false) utils.pack_lib('cmake_gpu', mx_cmake_lib, true) } } @@ -606,7 +606,7 @@ def test_unix_python2_gpu() { ws('workspace/ut-python2-gpu') { try { utils.unpack_and_init('gpu', mx_lib, true) - python2_gpu_ut('ubuntu_gpu') + python2_gpu_ut('ubuntu_gpu_cu100') utils.publish_test_coverage() } finally { utils.collect_test_results_unix('nosetests_gpu.xml', 'nosetests_python2_gpu.xml') @@ -623,7 +623,7 @@ def test_unix_python2_quantize_gpu() { timeout(time: max_time, unit: 'MINUTES') { try { utils.unpack_and_init('gpu', mx_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_python2_quantization_gpu', true) + utils.docker_run('ubuntu_gpu_cu100', 'unittest_ubuntu_python2_quantization_gpu', true) utils.publish_test_coverage() } finally { utils.collect_test_results_unix('nosetests_quantization_gpu.xml', 'nosetests_python2_quantize_gpu.xml') @@ -640,7 +640,7 @@ def test_unix_python2_mkldnn_gpu() { ws('workspace/ut-python2-mkldnn-gpu') { try { utils.unpack_and_init('mkldnn_gpu', mx_mkldnn_lib, true) - python2_gpu_ut('ubuntu_gpu') + python2_gpu_ut('ubuntu_gpu_cu100') utils.publish_test_coverage() } finally { utils.collect_test_results_unix('nosetests_gpu.xml', 'nosetests_python2_mkldnn_gpu.xml') @@ -690,7 +690,7 @@ def test_unix_python3_gpu() { ws('workspace/ut-python3-gpu') { try { utils.unpack_and_init('gpu', mx_lib, true) - python3_gpu_ut('ubuntu_gpu') + python3_gpu_ut('ubuntu_gpu_cu100') utils.publish_test_coverage() } finally { utils.collect_test_results_unix('nosetests_gpu.xml', 'nosetests_python3_gpu.xml') @@ -707,7 +707,7 @@ def test_unix_python3_quantize_gpu() { timeout(time: max_time, unit: 'MINUTES') { try { utils.unpack_and_init('gpu', mx_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_python3_quantization_gpu', true) + utils.docker_run('ubuntu_gpu_cu100', 'unittest_ubuntu_python3_quantization_gpu', true) utils.publish_test_coverage() } finally { utils.collect_test_results_unix('nosetests_quantization_gpu.xml', 'nosetests_python3_quantize_gpu.xml') @@ -792,7 +792,7 @@ def test_unix_python3_mkldnn_gpu() { ws('workspace/ut-python3-mkldnn-gpu') { try { utils.unpack_and_init('mkldnn_gpu', mx_mkldnn_lib, true) - python3_gpu_ut('ubuntu_gpu') + python3_gpu_ut('ubuntu_gpu_cu100') utils.publish_test_coverage() } finally { utils.collect_test_results_unix('nosetests_gpu.xml', 'nosetests_python3_mkldnn_gpu.xml') @@ -808,7 +808,7 @@ def test_unix_python3_mkldnn_nocudnn_gpu() { ws('workspace/ut-python3-mkldnn-gpu-nocudnn') { try { utils.unpack_and_init('mkldnn_gpu_nocudnn', mx_mkldnn_lib, true) - python3_gpu_ut_nocudnn('ubuntu_gpu') + python3_gpu_ut_nocudnn('ubuntu_gpu_cu100') utils.publish_test_coverage() } finally { utils.collect_test_results_unix('nosetests_gpu.xml', 'nosetests_python3_mkldnn_gpu_nocudnn.xml') @@ -842,7 +842,7 @@ def test_unix_python3_integration_gpu() { ws('workspace/it-python-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('gpu', mx_lib, true) - utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_python', true) + utils.docker_run('ubuntu_gpu_cu100', 'integrationtest_ubuntu_gpu_python', true) utils.publish_test_coverage() } } @@ -857,7 +857,7 @@ def test_unix_caffe_gpu() { timeout(time: max_time, unit: 'MINUTES') { utils.init_git() utils.unpack_lib('gpu', mx_lib) - utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_caffe', true) + utils.docker_run('ubuntu_gpu_cu100', 'integrationtest_ubuntu_gpu_caffe', true) utils.publish_test_coverage() } } @@ -871,7 +871,7 @@ def test_unix_cpp_package_gpu() { ws('workspace/it-cpp-package') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('gpu', mx_lib_cpp_examples, true) - utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_cpp_package', true) + utils.docker_run('ubuntu_gpu_cu100', 'integrationtest_ubuntu_gpu_cpp_package', true) utils.publish_test_coverage() } } @@ -913,7 +913,7 @@ def test_unix_scala_gpu() { ws('workspace/ut-scala-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('gpu', mx_lib, true) - utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_scala', true) + utils.docker_run('ubuntu_gpu_cu100', 'integrationtest_ubuntu_gpu_scala', true) utils.publish_test_coverage() } } @@ -996,7 +996,7 @@ def test_unix_cpp_gpu() { ws('workspace/ut-cpp-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('cmake_gpu', mx_cmake_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_cpp', true) + utils.docker_run('ubuntu_gpu_cu100', 'unittest_cpp', true) utils.publish_test_coverage() } } @@ -1010,7 +1010,7 @@ def test_unix_cpp_mkldnn_gpu() { ws('workspace/ut-cpp-mkldnn-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('cmake_mkldnn_gpu', mx_cmake_mkldnn_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_cpp', true) + utils.docker_run('ubuntu_gpu_cu100', 'unittest_cpp', true) utils.publish_test_coverage() } } @@ -1038,7 +1038,7 @@ def test_unix_perl_gpu() { ws('workspace/ut-perl-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('gpu', mx_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_cpugpu_perl', true) + utils.docker_run('ubuntu_gpu_cu100', 'unittest_ubuntu_cpugpu_perl', true) utils.publish_test_coverage() } } @@ -1052,7 +1052,7 @@ def test_unix_r_gpu() { ws('workspace/ut-r-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('gpu', mx_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_gpu_R', true) + utils.docker_run('ubuntu_gpu_cu100', 'unittest_ubuntu_gpu_R', true) utils.publish_test_coverage() } } @@ -1120,7 +1120,7 @@ def test_unix_distributed_kvstore_gpu() { ws('workspace/it-dist-kvstore') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('gpu', mx_lib, true) - utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_dist_kvstore', true) + utils.docker_run('ubuntu_gpu_cu100', 'integrationtest_ubuntu_gpu_dist_kvstore', true) utils.publish_test_coverage() } }