From e489f2efaf0e57201ef8bba9d30cd3204ec18d83 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Wed, 28 Jun 2023 17:42:53 +0800 Subject: [PATCH] Revert "Change Py3 use Ubuntu20 Docker (#52523)" This reverts commit 4001f7ae4b98a68048b87079a3109de69f6e5857. --- tools/dockerfile/build_scripts/install_gcc.sh | 2 ++ tools/dockerfile/ci_dockerfile.sh | 32 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tools/dockerfile/build_scripts/install_gcc.sh b/tools/dockerfile/build_scripts/install_gcc.sh index f0889bb5a91..5b12a63c845 100644 --- a/tools/dockerfile/build_scripts/install_gcc.sh +++ b/tools/dockerfile/build_scripts/install_gcc.sh @@ -68,6 +68,7 @@ elif [ "$1" == "gcc122" ]; then make -j8 && make install cd .. && rm -rf temp_gcc122 gcc-12.2.0 gcc-12.2.0.tar.gz cp ${lib_so_6} ${lib_so_6}.bak && rm -f ${lib_so_6} && + ln -s /usr/local/gcc-12.2/lib64/libgfortran.so.5 ${lib_so_5} && \ ln -s /usr/local/gcc-12.2/lib64/libstdc++.so.6 ${lib_so_6} && \ cp /usr/local/gcc-12.2/lib64/libstdc++.so.6.0.30 ${lib_path} elif [ "$1" == "gcc121" ]; then @@ -81,6 +82,7 @@ elif [ "$1" == "gcc121" ]; then make -j8 && make install cd .. && rm -rf temp_gcc122 gcc-12.1.0 gcc-12.1.0.tar.gz cp ${lib_so_6} ${lib_so_6}.bak && rm -f ${lib_so_6} && + ln -s /usr/local/gcc-12.1/lib64/libgfortran.so.5 ${lib_so_5} && \ ln -s /usr/local/gcc-12.1/lib64/libstdc++.so.6 ${lib_so_6} && \ cp /usr/local/gcc-12.1/lib64/libstdc++.so.6.0.30 ${lib_path} fi diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index 01ae650d438..8aa77be482a 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -78,24 +78,22 @@ function make_ubuntu_trt7_dockerfile(){ function make_centos_dockerfile(){ dockerfile_name="Dockerfile.cuda9_cudnn7_gcc48_py35_centos6" - sed "s##ubuntu:20.04#g" ./Dockerfile.ubuntu20 >${dockerfile_name} - sed -i "s###g" ${dockerfile_name} - sed -i "s#WITH_GPU:-ON#WITH_GPU:-OFF#g" ${dockerfile_name} - sed -i "s#RUN apt-key del 7fa2af80##g" ${dockerfile_name} - sed -i 's#RUN rm /etc/apt/sources.list.d/\*##g' ${dockerfile_name} - sed -i "s#RUN apt-key adv --fetch-keys https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub##g" ${dockerfile_name} + sed "s//12.0.1-cudnn8-devel-centos7/g" Dockerfile.centos >${dockerfile_name} + sed -i "s#COPY build_scripts /build_scripts#COPY tools/dockerfile/build_scripts ./build_scripts#g" ${dockerfile_name} dockerfile_line=$(wc -l ${dockerfile_name}|awk '{print $1}') - sed -i 's#RUN bash /build_scripts/install_trt.sh##g' ${dockerfile_name} - 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 libsndfile1 zstd pigz libcurl4-openssl-dev gettext zstd ninja-build" ${dockerfile_name} - sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3 install PyGithub wheel \&\& pip3.8 install PyGithub distro \&\& pip3.9 install PyGithub wheel \&\& pip3.10 install PyGithub distro" ${dockerfile_name} - sed -i "${dockerfile_line}i RUN apt remove git -y \&\& apt install -y libcurl4-openssl-dev gettext pigz zstd ninja-build \&\& 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 's##RUN apt-get install -y gcc g++ make#g' ${dockerfile_name} + sed -i "${dockerfile_line}i RUN yum install -y pigz graphviz zstd libsndfile ninja-build" ${dockerfile_name} + sed -i "${dockerfile_line}i RUN pip3.8 install distro" ${dockerfile_name} + sed -i "${dockerfile_line}i ENV LD_LIBRARY_PATH /opt/_internal/cpython-3.8.0/lib:/usr/local/ssl/lib:/opt/rh/devtoolset-2/root/usr/lib64:/opt/rh/devtoolset-2/root/usr/lib:/usr/local/lib64:/usr/local/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64 " ${dockerfile_name} + sed -i "${dockerfile_line}i ENV PATH /opt/_internal/cpython-3.8.0/bin:/usr/local/ssl:/usr/local/gcc-12.2/bin:/usr/local/go/bin:/root/gopath/bin:/opt/rh/devtoolset-2/root/usr/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/java/jdk1.8.0_192/bin " ${dockerfile_name} + sed -i "${dockerfile_line}i RUN rm -f /usr/bin/cc && ln -s /usr/local/gcc-12.2/bin/gcc /usr/bin/cc" ${dockerfile_name} + sed -i "${dockerfile_line}i RUN rm -f /usr/bin/g++ && ln -s /usr/local/gcc-12.2/bin/g++ /usr/bin/g++" ${dockerfile_name} + sed -i "${dockerfile_line}i RUN rm -f /usr/bin/c++ && ln -s /usr/local/gcc-12.2/bin/c++ /usr/bin/c++" ${dockerfile_name} + sed -i "${dockerfile_line}i RUN rm -f /usr/bin/gcc && ln -s /usr/local/gcc-12.2/bin/gcc /usr/bin/gcc" ${dockerfile_name} + sed -i "${dockerfile_line}i RUN ln -s /usr/lib64/libz.so /usr/local/lib/libz.so \\ + RUN ln -s /usr/local/lib/libnccl.so /usr/local/cuda/lib64/" ${dockerfile_name} + sed -i $"${dockerfile_line}i RUN wget --no-check-certificate -q https://paddle-edl.bj.bcebos.com/hadoop-2.7.7.tar.gz \\ + RUN tar -xzf hadoop-2.7.7.tar.gz && mv hadoop-2.7.7 /usr/local/" ${dockerfile_name} + sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc122 \nRUN mv /usr/bin/cc /usr/bin/cc.bak \&\& ln -s /usr/local/gcc-12.2/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-12.2/bin:\$PATH \nRUN bash build_scripts/build.sh#g" ${dockerfile_name} } -- GitLab