diff --git a/ci/docker/builder/cpu/ubuntu22.04/Dockerfile b/ci/docker/builder/cpu/ubuntu22.04/Dockerfile index 8589c60e0..77588b851 100644 --- a/ci/docker/builder/cpu/ubuntu22.04/Dockerfile +++ b/ci/docker/builder/cpu/ubuntu22.04/Dockerfile @@ -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 \ diff --git a/ci/docker/builder/cpu/ubuntu22.04/arm64/Dockerfile b/ci/docker/builder/cpu/ubuntu22.04/arm64/Dockerfile index 1157f8b6f..bc51ac1b5 100644 --- a/ci/docker/builder/cpu/ubuntu22.04/arm64/Dockerfile +++ b/ci/docker/builder/cpu/ubuntu22.04/arm64/Dockerfile @@ -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 \ diff --git a/ci/docker/builder/gpu/ubuntu22.04/Dockerfile b/ci/docker/builder/gpu/ubuntu22.04/Dockerfile index 8609d2d94..78cdae964 100644 --- a/ci/docker/builder/gpu/ubuntu22.04/Dockerfile +++ b/ci/docker/builder/gpu/ubuntu22.04/Dockerfile @@ -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 \