Skip to content

Commit

Permalink
[skip ci] Update Dockerfile to support gcc-12 better (#983)
Browse files Browse the repository at this point in the history
Signed-off-by: Cai Yudong <[email protected]>
  • Loading branch information
cydrain authored Dec 12, 2024
1 parent 0c9f118 commit dea48e3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
12 changes: 6 additions & 6 deletions ci/docker/builder/cpu/ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ ENV BFLOAT16_WHL="bfloat16-1.4.0-cp311-cp311-linux_x86_64.whl"

RUN apt update \
&& apt install -y ca-certificates apt-transport-https software-properties-common lsb-release \
&& apt install -y --no-install-recommends wget curl git make gfortran gcc g++ swig \
&& apt install -y gcc-12 g++-12 \
&& apt install -y --no-install-recommends wget curl git make gfortran gcc-12 g++-12 swig \
&& apt install -y python3.11 python3.11-dev python3.11-distutils \
&& apt install -y python3-setuptools \
&& cd /usr/bin \
&& unlink gcc && ln -s gcc-12 gcc \
&& unlink g++ && ln -s g++-12 g++ \
&& unlink python3 && ln -s python3.11 python3 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 120 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 120 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 310 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 311 \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
&& export PATH=$PATH:$HOME/.local/bin \
&& pip3 install wheel \
Expand Down
12 changes: 6 additions & 6 deletions ci/docker/builder/cpu/ubuntu22.04/arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ ENV BFLOAT16_WHL="bfloat16-1.4.0-cp311-cp311-linux_aarch64.whl"

RUN apt update \
&& apt install -y ca-certificates apt-transport-https software-properties-common lsb-release \
&& apt install -y --no-install-recommends wget curl git make gfortran gcc g++ swig libssl-dev \
&& apt install -y gcc-12 g++-12 \
&& apt install -y --no-install-recommends wget curl git make gfortran gcc-12 g++-12 swig libssl-dev \
&& apt install -y python3.11 python3.11-dev python3.11-distutils \
&& apt install -y python3-setuptools \
&& cd /usr/bin \
&& unlink gcc && ln -s gcc-12 gcc \
&& unlink g++ && ln -s g++-12 g++ \
&& unlink python3 && ln -s python3.11 python3 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 120 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 120 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 310 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 311 \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
&& export PATH=$PATH:$HOME/.local/bin \
&& pip3 install wheel \
Expand Down
13 changes: 7 additions & 6 deletions ci/docker/builder/gpu/ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ ENV BFLOAT16_WHL="bfloat16-1.4.0-cp311-cp311-linux_x86_64.whl"

RUN apt update \
&& apt install -y ca-certificates apt-transport-https software-properties-common lsb-release \
&& apt install -y --no-install-recommends wget curl git make gfortran gcc g++ swig \
&& apt install -y gcc-12 g++-12 \
&& apt install -y --no-install-recommends wget curl git make gfortran gcc-12 g++-12 swig \
&& apt install -y python3.11 python3.11-dev python3.11-distutils \
&& apt install -y python3-setuptools \
&& cd /usr/bin \
&& unlink gcc && ln -s gcc-12 gcc \
&& unlink g++ && ln -s g++-12 g++ \
&& unlink python3 && ln -s python3.11 python3 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 120 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 110 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 120 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 310 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 311 \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
&& export PATH=$PATH:$HOME/.local/bin \
&& pip3 install wheel \
Expand Down

0 comments on commit dea48e3

Please sign in to comment.