Skip to content

Commit 1346cd3

Browse files
authored
[dockerfile] fix python3.7 setuptools bug in release18 dockerfile (#42575)
* fix release dockerfile * fix GPG error in ubuntu18 * fix cpu * fix
1 parent 838dc66 commit 1346cd3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tools/dockerfile/Dockerfile.release18

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ ENV HOME /root
1717
# Add bash enhancements
1818
COPY paddle/scripts/docker/root/ /root/
1919

20-
RUN apt-get update && \
20+
RUN chmod 777 /tmp
21+
22+
RUN apt-get update --allow-unauthenticated && \
2123
apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa && \
2224
apt-get update && \
2325
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
4850

4951

5052
RUN apt-get update && \
51-
apt-get install -y python3.7 python3.7-dev && \
53+
apt-get install -y python3.7 python3.7-dev python3.7-distutils && \
5254
mv /usr/bin/python /usr/bin/python.bak && ln -s /usr/bin/python3.7 /usr/bin/python && \
5355
mv /usr/bin/python3 /usr/bin/python3.bak && ln -s /usr/bin/python3.7 /usr/bin/python3
5456

tools/dockerfile/ubuntu18_release.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ function install_whl(){
8080

8181
function set_cuda_env(){
8282
if [[ ${WITH_GPU} == "ON" ]]; then
83-
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
83+
sed -i "s#<setcuda>#ENV LD_LIBRARY_PATH=/usr/local/cuda-${ref_CUDA_MAJOR}/targets/x86_64-linux/lib:\$LD_LIBRARY_PATH \\
84+
\\
85+
RUN apt-key del 7fa2af80 \\
86+
RUN rm /etc/apt/sources.list.d/cuda.list \&\& rm /etc/apt/sources.list.d/nvidia-ml.list \\
87+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub #g" Dockerfile.tmp
8488
else
8589
sed -i 's#<setcuda>##g' Dockerfile.tmp
8690
fi

0 commit comments

Comments
 (0)