Skip to content

Commit 8b1e23c

Browse files
authored
dockerfile update (#832)
1 parent fbbbf3f commit 8b1e23c

10 files changed

+192
-64
lines changed

backends/custom_cpu/tools/dockerfile/Dockerfile.centos79.x86_64.gcc73

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ FROM centos:7.9.2009
44
LABEL maintainer="PaddlePaddle Authors <paddle-dev@baidu.com>"
55

66
RUN yum install -y epel-release deltarpm openssh-server kernel-headers kernel-devel libsndfile-devel \
7-
zlib-devel openssl-devel pcre-devel vim tk-devel tkinter libtool xz graphviz wget curl-devel \
8-
make bzip2 bzip2-devel git patch unzip bison yasm diffutils automake which file gettext-devel \
9-
sqlite-devel net-tools numactl-devel chrpath screen initscripts tree libffi-devel swig xz-devel
7+
zlib-devel pcre-devel vim tk-devel tkinter libtool xz graphviz wget curl-devel gettext-devel \
8+
make bzip2-devel patch unzip bison yasm diffutils automake which file xz-devel net-tools \
9+
sqlite-devel numactl-devel chrpath lrzsz initscripts tree libffi-devel swig ninja-build
1010

1111
# Add bash enhancements
1212
COPY root/ /root/
@@ -24,12 +24,20 @@ ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH
2424
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH
2525
RUN echo "source scl_source enable devtoolset-7" > "/etc/profile.d/devtoolset-7.sh"
2626

27-
# cmake 3.19
27+
# cmake 3.27.7
2828
WORKDIR /opt
29-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz && \
30-
tar -zxf cmake-3.19.0-Linux-x86_64.tar.gz && rm cmake-3.19.0-Linux-x86_64.tar.gz && \
31-
mv cmake-3.19.0-Linux-x86_64 cmake-3.19
32-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
29+
RUN wget -q https://github.com/Kitware/CMake/releases/download/v3.27.7/cmake-3.27.7-linux-x86_64.sh && \
30+
chmod +x cmake-3.27.7-linux-x86_64.sh && mkdir -p /opt/cmake-3.27.7 && \
31+
./cmake-3.27.7-linux-x86_64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
32+
rm -rf cmake-3.27.7-linux-x86_64.sh
33+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
34+
35+
# openssl 1.1.1g
36+
RUN wget -q --no-check-certificate https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \
37+
tar -zxf openssl-1.1.1g.tar.gz && cd openssl-1.1.1g && ./config && \
38+
make -j16 && make install && ldconfig && \
39+
cd .. && rm -rf openssl-1.1.1g && rm -rf openssl-1.1.1g.tar.gz
40+
ENV LD_LIBRARY_PATH=/usr/local/lib64:${LD_LIBRARY_PATH}
3341

3442
# git 2.17.1
3543
RUN wget -q https://paddle-ci.gz.bcebos.com/git-2.17.1.tar.gz && \

backends/custom_cpu/tools/dockerfile/Dockerfile.euleros.aarch64.gcc82

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ RUN cd /lib64 && mv libstdc++.so.6 libstdc++.so.6.bak && mv libstdc++.so.6.0.24
3333
ENV PATH=/opt/compiler/gcc-8.2/bin:$PATH
3434
ENV LD_LIBRARY_PATH=/opt/compiler/gcc-8.2/lib:/opt/compiler/gcc-8.2/lib64:$LD_LIBRARY_PATH
3535

36-
# cmake 3.19
36+
# cmake 3.27.7
3737
WORKDIR /opt
38-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.8-Linux-aarch64.tar.gz && \
39-
tar -zxf cmake-3.19.8-Linux-aarch64.tar.gz && rm cmake-3.19.8-Linux-aarch64.tar.gz && \
40-
mv cmake-3.19.8-Linux-aarch64 cmake-3.19
41-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
38+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-aarch64.sh && \
39+
chmod +x cmake-3.27.7-linux-aarch64.sh && mkdir -p /opt/cmake-3.27.7 && \
40+
./cmake-3.27.7-linux-aarch64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
41+
rm -rf cmake-3.27.7-linux-aarch64.sh
42+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
4243

4344
# Python 3.9.17
4445
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \

backends/custom_cpu/tools/dockerfile/Dockerfile.kylinv10.aarch64.gcc82

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ ENV LD_LIBRARY_PATH=/opt/compiler/gcc-8.2/lib:/opt/compiler/gcc-8.2/lib64:$LD_LI
3636
RUN mv /usr/bin/c++ /usr/bin/c++.bak
3737
RUN update-alternatives --install /usr/bin/c++ c++ /opt/compiler/gcc-8.2/bin/g++ 90
3838

39-
# cmake 3.19
39+
# cmake 3.27.7
4040
WORKDIR /opt
41-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.8-Linux-aarch64.tar.gz && \
42-
tar -zxf cmake-3.19.8-Linux-aarch64.tar.gz && rm cmake-3.19.8-Linux-aarch64.tar.gz && \
43-
mv cmake-3.19.8-Linux-aarch64 cmake-3.19
44-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
41+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-aarch64.sh && \
42+
chmod +x cmake-3.27.7-linux-aarch64.sh && mkdir -p /opt/cmake-3.27.7 && \
43+
./cmake-3.27.7-linux-aarch64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
44+
rm -rf cmake-3.27.7-linux-aarch64.sh
45+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
4546

4647
# Python 3.9.17
4748
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \

backends/custom_cpu/tools/dockerfile/Dockerfile.kylinv10.x86_64.gcc73

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ RUN yum install -y bzip2-devel make openssl-devel openssh-server elfutils-devel
99
blas-devel lapack-devel libjpeg-turbo-devel libpng-devel make git patch unzip bison hostname yasm \
1010
automake which file net-tools tree zlib-devel libffi-devel pcre-devel vim tk-devel tkinter rpm-build \
1111
sqlite-devel xz-devel graphviz wget curl-devel numactl-devel initscripts mesa-libGL libsndfile-devel \
12-
gcc gcc-c++ gcc-gfortran
12+
gcc gcc-c++ gcc-gfortran ninja-build lrzsz
1313

1414
# add bash envs
1515
COPY root/ /root/
1616

17-
# cmake 3.19
17+
# cmake 3.27.7
1818
WORKDIR /opt
19-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz && \
20-
tar -zxf cmake-3.19.0-Linux-x86_64.tar.gz && rm cmake-3.19.0-Linux-x86_64.tar.gz && \
21-
mv cmake-3.19.0-Linux-x86_64 cmake-3.19
22-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
19+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.sh && \
20+
chmod +x cmake-3.27.7-linux-x86_64.sh && mkdir -p /opt/cmake-3.27.7 && \
21+
./cmake-3.27.7-linux-x86_64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
22+
rm -rf cmake-3.27.7-linux-x86_64.sh
23+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
2324

2425
# Python 3.9.17
2526
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \

backends/custom_cpu/tools/dockerfile/Dockerfile.kylinv10.x86_64.gcc82

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ ENV LD_LIBRARY_PATH=/opt/compiler/gcc-8.2/lib:/opt/compiler/gcc-8.2/lib64:$LD_LI
3636
RUN mv /usr/bin/c++ /usr/bin/c++.bak
3737
RUN update-alternatives --install /usr/bin/c++ c++ /opt/compiler/gcc-8.2/bin/g++ 90
3838

39-
# cmake 3.19
39+
# cmake 3.27.7
4040
WORKDIR /opt
41-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz && \
42-
tar -zxf cmake-3.19.0-Linux-x86_64.tar.gz && rm cmake-3.19.0-Linux-x86_64.tar.gz && \
43-
mv cmake-3.19.0-Linux-x86_64 cmake-3.19
44-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
41+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.sh && \
42+
chmod +x cmake-3.27.7-linux-x86_64.sh && mkdir -p /opt/cmake-3.27.7 && \
43+
./cmake-3.27.7-linux-x86_64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
44+
rm -rf cmake-3.27.7-linux-x86_64.sh
45+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
4546

4647
# Python 3.9.17
4748
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \

backends/custom_cpu/tools/dockerfile/Dockerfile.ubuntu18.aarch64.gcc82

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,20 @@ RUN cd /usr/lib/aarch64-linux-gnu && \
3535
ENV PATH=/opt/compiler/gcc-8.2/bin:$PATH
3636
ENV LD_LIBRARY_PATH=/opt/compiler/gcc-8.2/lib:/opt/compiler/gcc-8.2/lib64:$LD_LIBRARY_PATH
3737

38-
# cmake 3.19
38+
# cmake 3.27.7
3939
WORKDIR /opt
40-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.8-Linux-aarch64.tar.gz && \
41-
tar -zxf cmake-3.19.8-Linux-aarch64.tar.gz && rm cmake-3.19.8-Linux-aarch64.tar.gz && \
42-
mv cmake-3.19.8-Linux-aarch64 cmake-3.19
43-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
40+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-aarch64.sh && \
41+
chmod +x cmake-3.27.7-linux-aarch64.sh && mkdir -p /opt/cmake-3.27.7 && \
42+
./cmake-3.27.7-linux-aarch64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
43+
rm -rf cmake-3.27.7-linux-aarch64.sh
44+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
4445

4546
# Python 3.9.17 - default 3.6
4647
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \
4748
tar -xzf Python-3.9.17.tgz && cd Python-3.9.17 && \
4849
CFLAGS="-Wformat" ./configure --prefix=/usr/local/ --enable-shared > /dev/null && \
4950
make -j16 > /dev/null && make altinstall > /dev/null && ldconfig && \
50-
cd ../ && rm -rf Python-3.9.17*
51+
cd ../ && rm -rf Python-3.9.17 && rm -rf Python-3.9.17.tgz
5152

5253
# create venv and activate
5354
RUN /usr/local/bin/python3.9 -m venv /opt/py39

backends/custom_cpu/tools/dockerfile/Dockerfile.ubuntu18.x86_64.gcc82

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ RUN cd /usr/lib/x86_64-linux-gnu && \
3535
ENV PATH=/opt/compiler/gcc-8.2/bin:$PATH
3636
ENV LD_LIBRARY_PATH=/opt/compiler/gcc-8.2/lib:/opt/compiler/gcc-8.2/lib64:$LD_LIBRARY_PATH
3737

38-
# cmake 3.19
38+
# cmake 3.27.7
3939
WORKDIR /opt
40-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz && \
41-
tar -zxf cmake-3.19.0-Linux-x86_64.tar.gz && rm cmake-3.19.0-Linux-x86_64.tar.gz && \
42-
mv cmake-3.19.0-Linux-x86_64 cmake-3.19
43-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
40+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.sh && \
41+
chmod +x cmake-3.27.7-linux-x86_64.sh && mkdir -p /opt/cmake-3.27.7 && \
42+
./cmake-3.27.7-linux-x86_64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
43+
rm -rf cmake-3.27.7-linux-x86_64.sh
44+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
4445

4546
# Python 3.9.17 - default 3.6
4647
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Docker Image for PaddlePaddle ubuntu develop base environment
2+
3+
FROM ubuntu:20.04
4+
LABEL maintainer="PaddlePaddle Authors <paddle-dev@baidu.com>"
5+
6+
RUN apt-get update && apt-get install -y apt-utils
7+
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
8+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
9+
RUN apt-get update && apt-get install -y software-properties-common && \
10+
add-apt-repository ppa:deadsnakes/ppa && add-apt-repository ppa:ubuntu-toolchain-r/test
11+
12+
# install other requirements
13+
RUN apt-get update && apt-get install -y curl wget vim git unzip unrar tar xz-utils bzip2 \
14+
coreutils ntp language-pack-zh-hans libsm6 libxext6 libxrender-dev libgl1-mesa-glx make \
15+
bison graphviz libjpeg-dev zlib1g zlib1g-dev automake locales swig net-tools libtool gzip \
16+
openssl libffi-dev pciutils libblas-dev libblas3 liblapack-dev liblapack3 screen liblzma-dev \
17+
openssh-server default-jre libsqlite3-dev libopenblas-dev libgcc-s1 libbz2-dev libssl-dev gdb
18+
19+
# add bash envs
20+
COPY root/ /root/
21+
22+
# # install gcc-9
23+
RUN apt-get install -y gcc-9 g++-9 gfortran-9
24+
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 && \
25+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 && \
26+
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 90
27+
28+
# cmake 3.27.7
29+
WORKDIR /opt
30+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-aarch64.sh && \
31+
chmod +x cmake-3.27.7-linux-aarch64.sh && mkdir -p /opt/cmake-3.27.7 && \
32+
./cmake-3.27.7-linux-aarch64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
33+
rm -rf cmake-3.27.7-linux-aarch64.sh
34+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
35+
36+
# Python 3.9.17 - default 3.8
37+
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \
38+
tar -xzf Python-3.9.17.tgz && cd Python-3.9.17 && \
39+
CFLAGS="-Wformat" ./configure --prefix=/usr/local/ --enable-shared > /dev/null && \
40+
make -j16 > /dev/null && make altinstall > /dev/null && ldconfig && \
41+
cd ../ && rm -rf Python-3.9.17 && rm -rf Python-3.9.17.tgz
42+
43+
# create venv and activate
44+
RUN /usr/local/bin/python3.9 -m venv /opt/py39
45+
# update env
46+
ENV PATH=/opt/py39/bin:$PATH
47+
RUN echo "source /opt/py39/bin/activate" >> /root/.bashrc
48+
# upgrade pip and setuptools
49+
RUN pip install --upgrade pip setuptools wheel
50+
51+
# install pylint and pre-commit
52+
RUN pip install pre-commit==2.17.0 pylint pytest astroid isort coverage qtconsole gitpython
53+
RUN pip install attrs pyyaml pathlib2 scipy requests psutil Cython clang-format==13.0.0
54+
RUN pip install PyGithub distro
55+
56+
# add more libs
57+
RUN apt-get update && apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev lsof libgeos-dev \
58+
pkg-config libhdf5-103 libhdf5-dev lrzsz libsndfile1 tree ninja-build -y
59+
60+
# install Paddle requirement
61+
RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/requirements.txt -O requirements.txt && \
62+
pip install -r requirements.txt && rm -rf requirements.txt
63+
RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/unittest_py/requirements.txt -O requirements.txt && \
64+
pip install -r requirements.txt && rm -rf requirements.txt
65+
66+
# # Install Go and glide
67+
# RUN wget -qO- https://golang.org/dl/go1.16.5.linux-arm64.tar.gz | \
68+
# tar -xz -C /usr/local && \
69+
# mkdir /root/gopath && \
70+
# mkdir /root/gopath/bin && \
71+
# mkdir /root/gopath/src
72+
# ENV GOROOT=/usr/local/go GOPATH=/root/gopath
73+
# # should not be in the same line with GOROOT definition, otherwise docker build could not find GOROOT.
74+
# ENV PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin
75+
# # install glide
76+
# RUN curl -s -q https://glide.sh/get | sh
77+
78+
# git credential to skip password typing
79+
RUN git config --global credential.helper store
80+
81+
# Fix locales to en_US.UTF-8
82+
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
83+
84+
# patchelf 0.14.5 - https://github.com/NixOS/patchelf/pull/216
85+
RUN wget -O /opt/0.14.5.tar.gz https://github.com/NixOS/patchelf/archive/refs/tags/0.14.5.tar.gz && \
86+
cd /opt && tar xzf 0.14.5.tar.gz && cd /opt/patchelf-0.14.5 && ./bootstrap.sh && ./configure && \
87+
make && make install && cd /opt && rm -rf patchelf-0.14.5 && rm -rf 0.14.5.tar.gz
88+
89+
# ccache 3.7.9
90+
RUN wget -q https://paddle-ci.gz.bcebos.com/ccache-3.7.9.tar.gz && \
91+
tar xf ccache-3.7.9.tar.gz && mkdir /usr/local/ccache-3.7.9 && cd ccache-3.7.9 && \
92+
./configure -prefix=/usr/local/ccache-3.7.9 && \
93+
make -j8 && make install && cd .. && rm -rf ccache-3.7.9* && \
94+
ln -s /usr/local/ccache-3.7.9/bin/ccache /usr/local/bin/ccache
95+
96+
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
97+
RUN mkdir /var/run/sshd && echo 'root:root' | chpasswd && \
98+
sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config && \
99+
sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
100+
CMD source ~/.bashrc
101+
102+
# Clean
103+
RUN apt-get clean -y
104+
RUN pip cache purge
105+
106+
# Create /lib64/ld-linux-aarch64.so.1
107+
RUN umask 0022 && \
108+
if [ ! -d "/lib64" ]; \
109+
then \
110+
mkdir /lib64 && ln -sf /lib/ld-linux-aarch64.so.1 /lib64/ld-linux-aarch64.so.1; \
111+
fi
112+
113+
EXPOSE 22

backends/custom_cpu/tools/dockerfile/Dockerfile.ubuntu20.x86_64.gcc84 renamed to backends/custom_cpu/tools/dockerfile/Dockerfile.ubuntu20.x86_64.gcc94

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,28 @@ RUN apt-get update && apt-get install -y software-properties-common && \
1010
add-apt-repository ppa:deadsnakes/ppa && add-apt-repository ppa:ubuntu-toolchain-r/test
1111

1212
# install other requirements
13-
RUN apt-get update && apt-get install -y curl wget vim git unzip unrar tar xz-utils libssl-dev bzip2 gzip make cmake sudo
14-
RUN apt-get update && apt-get install -y coreutils ntp language-pack-zh-hans libsm6 libxext6 libxrender-dev libgl1-mesa-glx
15-
RUN apt-get update && apt-get install -y bison graphviz libjpeg-dev zlib1g zlib1g-dev automake locales swig net-tools libtool
16-
RUN apt-get update && apt-get install -y openssl libffi-dev pciutils libblas-dev libblas3 liblapack-dev liblapack3 screen gdb liblzma-dev
17-
RUN apt-get update && apt-get install -y openssh-server default-jre libsqlite3-dev libopenblas-dev libgcc-s1 gcc g++ gfortran libbz2-dev
13+
RUN apt-get update && apt-get install -y curl wget vim git unzip unrar tar xz-utils bzip2 \
14+
coreutils ntp language-pack-zh-hans libsm6 libxext6 libxrender-dev libgl1-mesa-glx make \
15+
bison graphviz libjpeg-dev zlib1g zlib1g-dev automake locales swig net-tools libtool gzip \
16+
openssl libffi-dev pciutils libblas-dev libblas3 liblapack-dev liblapack3 screen liblzma-dev \
17+
openssh-server default-jre libsqlite3-dev libopenblas-dev libgcc-s1 libbz2-dev libssl-dev gdb
1818

1919
# add bash envs
2020
COPY root/ /root/
2121

22-
# # install gcc-8.4.0
23-
RUN apt-get install -y gcc-8 g++-8 gfortran-8
24-
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 && \
25-
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90 && \
26-
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-8 90
22+
# # install gcc-9
23+
RUN apt-get install -y gcc-9 g++-9 gfortran-9
24+
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 && \
25+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 && \
26+
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 90
2727

28-
# cmake 3.19
28+
# cmake 3.27.7
2929
WORKDIR /opt
30-
RUN wget -q https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz && \
31-
tar -zxf cmake-3.19.0-Linux-x86_64.tar.gz && rm cmake-3.19.0-Linux-x86_64.tar.gz && \
32-
mv cmake-3.19.0-Linux-x86_64 cmake-3.19
33-
ENV PATH=/opt/cmake-3.19/bin:${PATH}
30+
RUN wget -q https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.sh && \
31+
chmod +x cmake-3.27.7-linux-x86_64.sh && mkdir -p /opt/cmake-3.27.7 && \
32+
./cmake-3.27.7-linux-x86_64.sh --prefix=/opt/cmake-3.27.7 --skip-license && \
33+
rm -rf cmake-3.27.7-linux-x86_64.sh
34+
ENV PATH=/opt/cmake-3.27.7/bin:${PATH}
3435

3536
# Python 3.9.17 - default 3.8
3637
RUN wget -q https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz && \

backends/custom_cpu/tools/dockerfile/build-image.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ docker build --network=host -f Dockerfile.kylinv10.$(uname -m).gcc82 \
3434
-t registry.baidubce.com/device/paddle-cpu:kylinv10-$(uname -m)-gcc82 .
3535
docker push registry.baidubce.com/device/paddle-cpu:kylinv10-$(uname -m)-gcc82
3636

37-
if [ $(uname -i) == 'x86_64' ]; then
38-
# ubuntu20-gcc84
39-
docker build --network=host -f Dockerfile.ubuntu20.$(uname -m).gcc84 \
40-
--build-arg http_proxy=${proxy} \
41-
--build-arg https_proxy=${proxy} \
42-
--build-arg ftp_proxy=${proxy} \
43-
--build-arg no_proxy=bcebos.com,baidu.com \
44-
-t registry.baidubce.com/device/paddle-cpu:ubuntu20-$(uname -m)-gcc84 .
45-
docker push registry.baidubce.com/device/paddle-cpu:ubuntu20-$(uname -m)-gcc84
37+
# ubuntu20-gcc94
38+
docker build --network=host -f Dockerfile.ubuntu20.$(uname -m).gcc94 \
39+
--build-arg http_proxy=${proxy} \
40+
--build-arg https_proxy=${proxy} \
41+
--build-arg ftp_proxy=${proxy} \
42+
--build-arg no_proxy=bcebos.com,baidu.com \
43+
-t registry.baidubce.com/device/paddle-cpu:ubuntu20-$(uname -m)-gcc94 .
44+
docker push registry.baidubce.com/device/paddle-cpu:ubuntu20-$(uname -m)-gcc94
4645

46+
if [ $(uname -i) == 'x86_64' ]; then
4747
# centos79.gcc73
4848
docker build --network=host -f Dockerfile.centos79.$(uname -m).gcc73 \
4949
--build-arg http_proxy=${proxy} \

0 commit comments

Comments
 (0)