From 1346cd3516b0965590691449d587c306bba10285 Mon Sep 17 00:00:00 2001 From: pangyoki Date: Wed, 1 Feb 2023 17:09:43 +0800 Subject: [PATCH] [dockerfile] fix python3.7 setuptools bug in release18 dockerfile (#42575) * fix release dockerfile * fix GPG error in ubuntu18 * fix cpu * fix --- tools/dockerfile/Dockerfile.release18 | 6 ++++-- tools/dockerfile/ubuntu18_release.sh | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/dockerfile/Dockerfile.release18 b/tools/dockerfile/Dockerfile.release18 index cf343873d9..42b24030c0 100644 --- a/tools/dockerfile/Dockerfile.release18 +++ b/tools/dockerfile/Dockerfile.release18 @@ -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 diff --git a/tools/dockerfile/ubuntu18_release.sh b/tools/dockerfile/ubuntu18_release.sh index 2c12d4b74c..4c4cc780ce 100755 --- a/tools/dockerfile/ubuntu18_release.sh +++ b/tools/dockerfile/ubuntu18_release.sh @@ -80,7 +80,11 @@ function install_whl(){ function set_cuda_env(){ if [[ ${WITH_GPU} == "ON" ]]; then - sed -i "s##ENV LD_LIBRARY_PATH=/usr/local/cuda-${ref_CUDA_MAJOR}/targets/x86_64-linux/lib:\$LD_LIBRARY_PATH #g" Dockerfile.tmp + sed -i "s##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###g' Dockerfile.tmp fi -- GitLab