未验证 提交 4001f7ae 编写于 作者: T tianshuo78520a 提交者: GitHub

Change Py3 use Ubuntu20 Docker (#52523)

* test py3.8

* fix

* test gcc12

* test gcc12

* test gcc12

* test py3.8

* test py3

* fix

* fix

* add ubutnu20

* add ubutnu20

* add ubutnu20

* test py3

* fix error

* fix error

* fix error

* fix error

* fix error

* update py version

* fix

* test docker

* test docker

* test docker

* fix pip version,use pip3.9

* log error

* log add

* test ci

* add test log

* del

* fix

* test ci

* test ci

* update dockerfile

* update ci_dockerfile

* update ci_dockerfile

* update ci_dockerfile

* fix

* add git

* fix
上级 f1e3575e
...@@ -68,7 +68,6 @@ elif [ "$1" == "gcc122" ]; then ...@@ -68,7 +68,6 @@ elif [ "$1" == "gcc122" ]; then
make -j8 && make install make -j8 && make install
cd .. && rm -rf temp_gcc122 gcc-12.2.0 gcc-12.2.0.tar.gz 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} && 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} && \ 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} cp /usr/local/gcc-12.2/lib64/libstdc++.so.6.0.30 ${lib_path}
elif [ "$1" == "gcc121" ]; then elif [ "$1" == "gcc121" ]; then
...@@ -82,7 +81,6 @@ elif [ "$1" == "gcc121" ]; then ...@@ -82,7 +81,6 @@ elif [ "$1" == "gcc121" ]; then
make -j8 && make install make -j8 && make install
cd .. && rm -rf temp_gcc122 gcc-12.1.0 gcc-12.1.0.tar.gz 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} && 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} && \ 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} cp /usr/local/gcc-12.1/lib64/libstdc++.so.6.0.30 ${lib_path}
fi fi
...@@ -78,22 +78,24 @@ function make_ubuntu_trt7_dockerfile(){ ...@@ -78,22 +78,24 @@ function make_ubuntu_trt7_dockerfile(){
function make_centos_dockerfile(){ function make_centos_dockerfile(){
dockerfile_name="Dockerfile.cuda9_cudnn7_gcc48_py35_centos6" dockerfile_name="Dockerfile.cuda9_cudnn7_gcc48_py35_centos6"
sed "s/<baseimg>/12.0.1-cudnn8-devel-centos7/g" Dockerfile.centos >${dockerfile_name} sed "s#<baseimg>#ubuntu:20.04#g" ./Dockerfile.ubuntu20 >${dockerfile_name}
sed -i "s#COPY build_scripts /build_scripts#COPY tools/dockerfile/build_scripts ./build_scripts#g" ${dockerfile_name} sed -i "s#<setcuda>##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}
dockerfile_line=$(wc -l ${dockerfile_name}|awk '{print $1}') dockerfile_line=$(wc -l ${dockerfile_name}|awk '{print $1}')
sed -i "${dockerfile_line}i RUN yum install -y pigz graphviz zstd libsndfile ninja-build" ${dockerfile_name} sed -i 's#RUN bash /build_scripts/install_trt.sh##g' ${dockerfile_name}
sed -i "${dockerfile_line}i RUN pip3.8 install distro" ${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 \&\& \
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} tar -xzf hadoop-2.7.7.tar.gz && mv hadoop-2.7.7 /usr/local/" ${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 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 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 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 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 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 \&\& \
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} tar -xvf git-2.17.1.tar.gz \&\& \
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} cd git-2.17.1 \&\& \
sed -i "${dockerfile_line}i RUN ln -s /usr/lib64/libz.so /usr/local/lib/libz.so \\ ./configure --with-openssl --with-curl --prefix=/usr/local \&\& \
RUN ln -s /usr/local/lib/libnccl.so /usr/local/cuda/lib64/" ${dockerfile_name} make -j8 \&\& make install " ${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 \\ sed -i 's#<install_cpu_package>#RUN apt-get install -y gcc g++ make#g' ${dockerfile_name}
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}
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册