未验证 提交 1346cd35 编写于 作者: P pangyoki 提交者: GitHub

[dockerfile] fix python3.7 setuptools bug in release18 dockerfile (#42575)

* fix release dockerfile

* fix GPG error in ubuntu18

* fix cpu

* fix
上级 838dc660
......@@ -17,7 +17,9 @@ ENV HOME /root
# Add bash enhancements
COPY paddle/scripts/docker/root/ /root/
RUN apt-get update && \
RUN chmod 777 /tmp
RUN apt-get update --allow-unauthenticated && \
apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y curl wget vim git unzip unrar tar xz-utils libssl-dev bzip2 gzip \
......@@ -48,7 +50,7 @@ ENV PATH=/home/cmake-3.16.0-Linux-x86_64/bin:$PATH
RUN apt-get update && \
apt-get install -y python3.7 python3.7-dev && \
apt-get install -y python3.7 python3.7-dev python3.7-distutils && \
mv /usr/bin/python /usr/bin/python.bak && ln -s /usr/bin/python3.7 /usr/bin/python && \
mv /usr/bin/python3 /usr/bin/python3.bak && ln -s /usr/bin/python3.7 /usr/bin/python3
......
......@@ -80,7 +80,11 @@ function install_whl(){
function set_cuda_env(){
if [[ ${WITH_GPU} == "ON" ]]; then
sed -i "s#<setcuda>#ENV LD_LIBRARY_PATH=/usr/local/cuda-${ref_CUDA_MAJOR}/targets/x86_64-linux/lib:\$LD_LIBRARY_PATH #g" Dockerfile.tmp
sed -i "s#<setcuda>#ENV LD_LIBRARY_PATH=/usr/local/cuda-${ref_CUDA_MAJOR}/targets/x86_64-linux/lib:\$LD_LIBRARY_PATH \\
\\
RUN apt-key del 7fa2af80 \\
RUN rm /etc/apt/sources.list.d/cuda.list \&\& rm /etc/apt/sources.list.d/nvidia-ml.list \\
RUN apt-key adv --fetch-keys https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub #g" Dockerfile.tmp
else
sed -i 's#<setcuda>##g' Dockerfile.tmp
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册