From c79ae02b3bcf553d073759083a93063e7d88b8fc Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Wed, 2 Nov 2022 17:06:23 +0800 Subject: [PATCH] add cuda117 dockerfile (#47412) * add cuda117 dockerfile; test=cuda117 * notest;test=cuda117 * test=cuda117 * test=document_fix --- tools/dockerfile/ci_dockerfile.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index fbc21ec955..b793f31004 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -145,12 +145,33 @@ function make_ce_framework_dockcerfile(){ sed -i 's#python setup.py install#python3.7 setup.py install#g' ${dockerfile_name} } +function make_unbuntu18_cu117_dockerfile(){ + dockerfile_name="Dockerfile.cuda117_cudnn8_gcc82_ubuntu18_coverage" + sed "s##nvidia/cuda:11.7.0-cudnn8-devel-ubuntu18.04#g" ./Dockerfile.ubuntu18 >${dockerfile_name} + sed -i "s##ENV LD_LIBRARY_PATH=/usr/local/cuda-11.7/targets/x86_64-linux/lib:\$LD_LIBRARY_PATH #g" ${dockerfile_name} + sed -i 's###g' ${dockerfile_name} + sed -i "7i ENV TZ=Asia/Beijing" ${dockerfile_name} + sed -i "8i RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone" ${dockerfile_name} + sed -i "27i RUN apt-get update && apt-get install -y liblzma-dev openmpi-bin openmpi-doc libopenmpi-dev libsndfile1" ${dockerfile_name} + dockerfile_line=$(wc -l ${dockerfile_name}|awk '{print $1}') + sed -i "${dockerfile_line}i RUN wget --no-check-certificate -q https://paddle-edl.bj.bcebos.com/hadoop-2.7.7.tar.gz \&\& \ + tar -xzf hadoop-2.7.7.tar.gz && mv hadoop-2.7.7 /usr/local/" ${dockerfile_name} + sed -i "${dockerfile_line}i RUN apt remove git -y \&\& apt install -y libcurl4-openssl-dev gettext pigz zstd \&\& wget -q https://paddle-ci.gz.bcebos.com/git-2.17.1.tar.gz \&\& \ + tar -xvf git-2.17.1.tar.gz \&\& \ + cd git-2.17.1 \&\& \ + ./configure --with-openssl --with-curl --prefix=/usr/local \&\& \ + 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} +} + function main() { make_ubuntu_dockerfile make_ubuntu_trt7_dockerfile make_centos_dockerfile make_cinn_dockerfile make_ce_framework_dockcerfile + make_unbuntu18_cu117_dockerfile } main "$@" -- GitLab