From 924ca81db9e4e981a842564d8fb43286d8392d9d Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Fri, 16 Jun 2023 11:08:59 +0800 Subject: [PATCH] Update CUDA12 Dockerfile (#54547) * Ampere-ci-test * Ampere-ci-test * fix build error,Ampere-ci-test * fix glide --- tools/dockerfile/Dockerfile.ubuntu20 | 2 +- tools/dockerfile/build_scripts/install_cudnn.sh | 8 ++++++++ tools/dockerfile/ci_dockerfile.sh | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/dockerfile/Dockerfile.ubuntu20 b/tools/dockerfile/Dockerfile.ubuntu20 index e3c4f0a518f..98bc6ec8073 100644 --- a/tools/dockerfile/Dockerfile.ubuntu20 +++ b/tools/dockerfile/Dockerfile.ubuntu20 @@ -106,7 +106,7 @@ ENV GOROOT=/usr/local/go GOPATH=/root/gopath # should not be in the same line with GOROOT definition, otherwise docker build could not find GOROOT. ENV PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin # install glide -RUN curl -s -q https://glide.sh/get | sh +RUN apt-get install -y golang-glide # git credential to skip password typing RUN git config --global credential.helper store diff --git a/tools/dockerfile/build_scripts/install_cudnn.sh b/tools/dockerfile/build_scripts/install_cudnn.sh index 2310370f223..0ee6d1e160e 100644 --- a/tools/dockerfile/build_scripts/install_cudnn.sh +++ b/tools/dockerfile/build_scripts/install_cudnn.sh @@ -53,4 +53,12 @@ elif [[ "$1" == "cudnn841" && "$VERSION" == "11.7" ]]; then cp -r lib /usr && cd ../ && \ rm -f cudnn-linux-x86_64-8.4.1.50_cuda11.6-archive.tar.xz && \ rm -rf cudnn-linux-x86_64-8.4.1.50_cuda11.6-archive +elif [[ "$1" == "cudnn891" && "$VERSION" == "12.0" ]]; then + wget https://paddle-ci.gz.bcebos.com/cudnn/cudnn-linux-x86_64-8.9.1.23_cuda12-archive.tar.xz --no-check-certificate + tar xJvf cudnn-linux-x86_64-8.9.1.23_cuda12-archive.tar.xz && \ + cd cudnn-linux-x86_64-8.9.1.23_cuda12-archive && \ + cp -r include /usr && \ + cp -r lib /usr && cd ../ && \ + rm -f cudnn-linux-x86_64-8.9.1.23_cuda12-archive.tar.xz && \ + rm -rf cudnn-linux-x86_64-8.9.1.23_cuda12-archive fi diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index 83651c781c7..01ae650d438 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -165,6 +165,7 @@ function make_unbuntu18_cu117_dockerfile(){ make -j8 \&\& make install " ${dockerfile_name} sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3 install PyGithub wheel distro \&\& pip3.7 install PyGithub \&\& pip3.8 install distro" ${dockerfile_name} sed -i 's# && rm /etc/apt/sources.list.d/nvidia-ml.list##g' ${dockerfile_name} + sed -i 's#Run bash /build_scripts/install_cudnn.sh cudnn841#RUN bash /build_scripts/install_cudnn.sh cudnn891#g' ${dockerfile_name} } function make_ubuntu18_cu112_dockerfile(){ -- GitLab