From 38454cc1be7201f9fb69681b2b998baca1bee357 Mon Sep 17 00:00:00 2001 From: Martin Heuschober Date: Thu, 23 Nov 2023 12:31:17 +0000 Subject: [PATCH] Update Dockerfile: download conda not via debian repo this did only work for amd64, but not for aarch64 Signed-off-by: Martin Heuschober --- Dockerfile | 64 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16e605a9ad2..3d991d1e91f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,22 +56,64 @@ RUN test -n "$TARGETARCH" \ # Extras requirements FROM requirements-core as requirements-extras -RUN curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \ - install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \ - gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list && \ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" | tee -a /etc/apt/sources.list.d/conda.list && \ - apt-get update && \ - apt-get install -y conda +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV PATH /opt/conda/bin:$PATH + +# hadolint ignore=DL3008 +RUN set -x && \ + apt-get update --fix-missing && \ + apt-get install -y --no-install-recommends \ + bzip2 \ + ca-certificates \ + git \ + libglib2.0-0 \ + libsm6 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxfixes3 \ + libxi6 \ + libxinerama1 \ + libxrandr2 \ + libxrender1 \ + mercurial \ + openssh-client \ + procps \ + subversion \ + wget \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* && \ + UNAME_M="$(uname -m)" && \ + if [ "${UNAME_M}" = "x86_64" ]; then \ + ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh"; \ + SHA256SUM="6c8a4abb36fbb711dc055b7049a23bbfd61d356de9468b41c5140f8a11abd851"; \ + elif [ "${UNAME_M}" = "s390x" ]; then \ + ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-s390x.sh"; \ + SHA256SUM="ee817071a2ad94e044fb48061a721bc86606b2f4906b705e4f42177eeb3ca7c5"; \ + elif [ "${UNAME_M}" = "aarch64" ]; then \ + ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-aarch64.sh"; \ + SHA256SUM="69ee26361c1ec974199bce5c0369e3e9a71541de7979d2b9cfa4af556d1ae0ea"; \ + elif [ "${UNAME_M}" = "ppc64le" ]; then \ + ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-ppc64le.sh"; \ + SHA256SUM="5ea1ed9808af95eb2655fe6a4ffdb66bea66ecd1d053fc2ee69eacc7685ef665"; \ + fi && \ + wget "${ANACONDA_URL}" -O anaconda.sh -q && \ + echo "${SHA256SUM} anaconda.sh" > shasum && \ + sha256sum --check --status shasum && \ + /bin/bash anaconda.sh -b -p /opt/conda && \ + rm anaconda.sh shasum && \ + ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ + echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ + echo "conda activate base" >> ~/.bashrc && \ + find /opt/conda/ -follow -type f -name '*.a' -delete && \ + find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ + /opt/conda/bin/conda clean -afy ENV PATH="/root/.cargo/bin:${PATH}" RUN pip install --upgrade pip RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - -# \ -# ; fi - ################################### ###################################