From a2e0b7cb4ad01f8ceb48920a721697c7ca92b8c5 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Fri, 25 Sep 2020 10:02:11 +0800 Subject: [PATCH] update gcc8 in python3 ci docker (#26979) * update gcc8 in python3 ci docker * change cuda 10.2 * update cudnn8 * nvidia error cuda10.2-cudnn8-centos6 images * fix third cache --- cmake/third_party.cmake | 1 + tools/dockerfile/Dockerfile.centos | 6 ++---- tools/dockerfile/ci_dockerfile.sh | 11 ++++++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index 9edfcb967ab..ffd32cc78f0 100644 --- a/cmake/third_party.cmake +++ b/cmake/third_party.cmake @@ -39,6 +39,7 @@ set(third_party_deps) # REPOSITORY ${TARGET_REPOSITORY} # TAG ${TARGET_TAG} # DIR ${TARGET_SOURCE_DIR}) + FUNCTION(cache_third_party TARGET) SET(options "") SET(oneValueArgs URL REPOSITORY TAG DIR) diff --git a/tools/dockerfile/Dockerfile.centos b/tools/dockerfile/Dockerfile.centos index b10e76a4b4d..a50d08354b8 100644 --- a/tools/dockerfile/Dockerfile.centos +++ b/tools/dockerfile/Dockerfile.centos @@ -80,9 +80,7 @@ RUN wget https://paddle-ci.gz.bcebos.com/ccache-3.7.9.tar.gz && \ make -j8 && make install && \ ln -s /usr/local/ccache-3.7.9/bin/ccache /usr/local/bin/ccache -# gcc4.8 TRT -RUN mkdir -p /opt/compiler && cd /opt/compiler && \ - wget -q https://paddle-ci.gz.bcebos.com/gcc-4.8.2.tar.gz && \ - tar xf gcc-4.8.2.tar.gz && rm -f gcc-4.8.2.tar.gz +# Downgrade gcc&&g++ + CMD ["bash", "/paddle/paddle/scripts/docker/build.sh"] diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index 3716084487e..9c8f8f563ab 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -21,7 +21,7 @@ function make_ubuntu_dockerfile(){ function make_centos_dockerfile(){ dockerfile_name="Dockerfile.cuda9_cudnn7_gcc48_py35_centos6" - sed 's//9.0-cudnn7-devel-centos6/g' Dockerfile.centos >${dockerfile_name} + sed 's//10.2-cudnn7-devel-centos6/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 "${dockerfile_line}i RUN ln -s /usr/lib64/libz.so /usr/local/lib/libz.so && \ @@ -29,6 +29,15 @@ function make_centos_dockerfile(){ rm -rf /usr/include/NvInfer*" ${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 's##WORKDIR /usr/bin \ + COPY tools/dockerfile/build_scripts /build_scripts \ + RUN bash /build_scripts/install_gcc.sh gcc82 \&\& rm -rf /build_scripts \ + RUN cp gcc gcc.bak \&\& cp g++ g++.bak \&\& rm gcc \&\& rm g++ \ + RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/local/bin/gcc \ + RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/local/bin/g++ \ + RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/gcc \ + RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/bin/g++ \ + ENV PATH=/usr/local/gcc-8.2/bin:$PATH #g' ${dockerfile_name} } -- GitLab