From 5d08dd329f2b48bb3faa8f5aa2d99ffee6ce30a6 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:52:24 -0700 Subject: [PATCH 1/9] Use `LABEL` for `maintainer` field --- linux-anvil-ppc64le/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-anvil-ppc64le/Dockerfile b/linux-anvil-ppc64le/Dockerfile index 7e388af..090d64f 100644 --- a/linux-anvil-ppc64le/Dockerfile +++ b/linux-anvil-ppc64le/Dockerfile @@ -2,7 +2,7 @@ ARG DISTRO_NAME ARG DISTRO_VER FROM ppc64le/${DISTRO_NAME}:${DISTRO_VER} -MAINTAINER conda-forge +LABEL maintainer="conda-forge " # Add qemu in here so that we can use this image on regular linux hosts with qemu user installed ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static From afe0d508f7ce352f2b9997e920e9b3b1e2e3bdcf Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:52:24 -0700 Subject: [PATCH 2/9] Add and use `DISTRO_ARCH` in CentOS 7 images --- .github/workflows/ci.yaml | 3 +++ linux-anvil-aarch64/Dockerfile | 9 +++++++-- linux-anvil-cos7-x86_64/Dockerfile | 9 +++++++-- linux-anvil-ppc64le/Dockerfile | 10 +++++++--- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cf9e9df..747d4b2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,18 +19,21 @@ jobs: cfg: - DOCKERIMAGE: linux-anvil-cos7-x86_64 DOCKERTAG: latest + DISTRO_ARCH: "amd64" DISTRO_NAME: "centos" DISTRO_VER: "7" SHORT_DESCRIPTION: "conda-forge build image for Cent0S 7 on x86_64" - DOCKERIMAGE: linux-anvil-ppc64le DOCKERTAG: latest + DISTRO_ARCH: "ppc64le" DISTRO_NAME: "centos" DISTRO_VER: "7" SHORT_DESCRIPTION: "conda-forge build image for Cent0S 7 on ppc64le" - DOCKERIMAGE: linux-anvil-aarch64 DOCKERTAG: latest + DISTRO_ARCH: "arm64" DISTRO_NAME: "centos" DISTRO_VER: "7" SHORT_DESCRIPTION: "conda-forge build image for Cent0S 7 on aarch64" diff --git a/linux-anvil-aarch64/Dockerfile b/linux-anvil-aarch64/Dockerfile index dc89512..e9c9df8 100644 --- a/linux-anvil-aarch64/Dockerfile +++ b/linux-anvil-aarch64/Dockerfile @@ -1,14 +1,19 @@ +# Set `ARG`s for use in `FROM`. +ARG DISTRO_ARCH ARG DISTRO_NAME ARG DISTRO_VER -FROM arm64v8/${DISTRO_NAME}:${DISTRO_VER} +FROM --platform=linux/${DISTRO_ARCH} ${DISTRO_NAME}:${DISTRO_VER} ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static LABEL maintainer="conda-forge " +# Set `ARG`s during build. +ARG DISTRO_ARCH ARG DISTRO_NAME ARG DISTRO_VER -ENV DISTRO_NAME=${DISTRO_NAME} \ +ENV DISTRO_ARCH=${DISTRO_ARCH} \ + DISTRO_NAME=${DISTRO_NAME} \ DISTRO_VER=${DISTRO_VER} # Set an encoding to make things work smoothly. diff --git a/linux-anvil-cos7-x86_64/Dockerfile b/linux-anvil-cos7-x86_64/Dockerfile index 99dadf6..c773f1b 100644 --- a/linux-anvil-cos7-x86_64/Dockerfile +++ b/linux-anvil-cos7-x86_64/Dockerfile @@ -1,12 +1,17 @@ +# Set `ARG`s for use in `FROM`. +ARG DISTRO_ARCH ARG DISTRO_NAME ARG DISTRO_VER -FROM ${DISTRO_NAME}:${DISTRO_VER} +FROM --platform=linux/${DISTRO_ARCH} ${DISTRO_NAME}:${DISTRO_VER} LABEL maintainer="conda-forge " +# Set `ARG`s during build. +ARG DISTRO_ARCH ARG DISTRO_NAME ARG DISTRO_VER -ENV DISTRO_NAME=${DISTRO_NAME} \ +ENV DISTRO_ARCH=${DISTRO_ARCH} \ + DISTRO_NAME=${DISTRO_NAME} \ DISTRO_VER=${DISTRO_VER} # Set an encoding to make things work smoothly. diff --git a/linux-anvil-ppc64le/Dockerfile b/linux-anvil-ppc64le/Dockerfile index 090d64f..15476b3 100644 --- a/linux-anvil-ppc64le/Dockerfile +++ b/linux-anvil-ppc64le/Dockerfile @@ -1,16 +1,20 @@ +# Set `ARG`s for use in `FROM`. +ARG DISTRO_ARCH ARG DISTRO_NAME ARG DISTRO_VER -FROM ppc64le/${DISTRO_NAME}:${DISTRO_VER} +FROM --platform=linux/${DISTRO_ARCH} ${DISTRO_NAME}:${DISTRO_VER} LABEL maintainer="conda-forge " # Add qemu in here so that we can use this image on regular linux hosts with qemu user installed ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static -# Set CUDA_VER during runtime. +# Set `ARG`s during build. +ARG DISTRO_ARCH ARG DISTRO_NAME ARG DISTRO_VER -ENV DISTRO_NAME=${DISTRO_NAME} \ +ENV DISTRO_ARCH=${DISTRO_ARCH} \ + DISTRO_NAME=${DISTRO_NAME} \ DISTRO_VER=${DISTRO_VER} # Set an encoding to make things work smoothly. From 512980af3809ca6e982f5d8e935b363ce6da77fd Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:52:25 -0700 Subject: [PATCH 3/9] Define `LANGUAGE` consitently in cos7 images --- linux-anvil-aarch64/Dockerfile | 2 +- linux-anvil-cos7-x86_64/Dockerfile | 1 + linux-anvil-ppc64le/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-anvil-aarch64/Dockerfile b/linux-anvil-aarch64/Dockerfile index e9c9df8..2bbde34 100644 --- a/linux-anvil-aarch64/Dockerfile +++ b/linux-anvil-aarch64/Dockerfile @@ -18,7 +18,7 @@ ENV DISTRO_ARCH=${DISTRO_ARCH} \ # Set an encoding to make things work smoothly. ENV LANG en_US.UTF-8 -ENV LANGUAGE=en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 # bust the docker cache so that we always rerun the installs below ADD https://loripsum.net/api /opt/docker/etc/gibberish diff --git a/linux-anvil-cos7-x86_64/Dockerfile b/linux-anvil-cos7-x86_64/Dockerfile index c773f1b..4032bce 100644 --- a/linux-anvil-cos7-x86_64/Dockerfile +++ b/linux-anvil-cos7-x86_64/Dockerfile @@ -16,6 +16,7 @@ ENV DISTRO_ARCH=${DISTRO_ARCH} \ # Set an encoding to make things work smoothly. ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 # Add qemu in here so that we can use this image on regular linux hosts with qemu user installed ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static diff --git a/linux-anvil-ppc64le/Dockerfile b/linux-anvil-ppc64le/Dockerfile index 15476b3..1da6968 100644 --- a/linux-anvil-ppc64le/Dockerfile +++ b/linux-anvil-ppc64le/Dockerfile @@ -19,7 +19,7 @@ ENV DISTRO_ARCH=${DISTRO_ARCH} \ # Set an encoding to make things work smoothly. ENV LANG en_US.UTF-8 -ENV LANGUAGE=en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 # bust the docker cache so that we always rerun the installs below ADD https://loripsum.net/api /opt/docker/etc/gibberish From 670277b60a8fd455eb218fd362ad01295b303a06 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:52:26 -0700 Subject: [PATCH 4/9] Add QEMU after loripsum --- linux-anvil-aarch64/Dockerfile | 5 +++-- linux-anvil-cos7-x86_64/Dockerfile | 6 +++--- linux-anvil-ppc64le/Dockerfile | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/linux-anvil-aarch64/Dockerfile b/linux-anvil-aarch64/Dockerfile index 2bbde34..97c33b5 100644 --- a/linux-anvil-aarch64/Dockerfile +++ b/linux-anvil-aarch64/Dockerfile @@ -4,8 +4,6 @@ ARG DISTRO_NAME ARG DISTRO_VER FROM --platform=linux/${DISTRO_ARCH} ${DISTRO_NAME}:${DISTRO_VER} -ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static - LABEL maintainer="conda-forge " # Set `ARG`s during build. @@ -23,6 +21,9 @@ ENV LANGUAGE en_US.UTF-8 # bust the docker cache so that we always rerun the installs below ADD https://loripsum.net/api /opt/docker/etc/gibberish +# Add qemu in here so that we can use this image on regular linux hosts with qemu user installed +ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static + # (arm64v8/centos:7 only) Fix language override to get a working en_US.UTF-8 locale; backports: # https://github.com/CentOS/sig-cloud-instance-build/commit/2892c17fa8a520e58c3f42cd56587863fe675670 RUN sed -i 's/override_install_langs=en_US\.UTF-8/override_install_langs=en_US.utf8/' /etc/yum.conf diff --git a/linux-anvil-cos7-x86_64/Dockerfile b/linux-anvil-cos7-x86_64/Dockerfile index 4032bce..b131d94 100644 --- a/linux-anvil-cos7-x86_64/Dockerfile +++ b/linux-anvil-cos7-x86_64/Dockerfile @@ -18,14 +18,14 @@ ENV DISTRO_ARCH=${DISTRO_ARCH} \ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 +# bust the docker cache so that we always rerun the installs below +ADD https://loripsum.net/api /opt/docker/etc/gibberish + # Add qemu in here so that we can use this image on regular linux hosts with qemu user installed ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static ADD qemu-s390x-static /usr/bin/qemu-s390x-static -# bust the docker cache so that we always rerun the installs below -ADD https://loripsum.net/api /opt/docker/etc/gibberish - # Add the archived repo URL and fix RPM imports ADD centos7-repos /tmp/centos7-repos ADD scripts/fix_rpm /opt/docker/bin/fix_rpm diff --git a/linux-anvil-ppc64le/Dockerfile b/linux-anvil-ppc64le/Dockerfile index 1da6968..ebe50ae 100644 --- a/linux-anvil-ppc64le/Dockerfile +++ b/linux-anvil-ppc64le/Dockerfile @@ -6,9 +6,6 @@ FROM --platform=linux/${DISTRO_ARCH} ${DISTRO_NAME}:${DISTRO_VER} LABEL maintainer="conda-forge " -# Add qemu in here so that we can use this image on regular linux hosts with qemu user installed -ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static - # Set `ARG`s during build. ARG DISTRO_ARCH ARG DISTRO_NAME @@ -24,6 +21,9 @@ ENV LANGUAGE en_US.UTF-8 # bust the docker cache so that we always rerun the installs below ADD https://loripsum.net/api /opt/docker/etc/gibberish +# Add qemu in here so that we can use this image on regular linux hosts with qemu user installed +ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static + # Add the archived repo URL and fix RPM imports ADD centos7-repos /tmp/centos7-repos ADD scripts/fix_rpm /opt/docker/bin/fix_rpm From 527bff40e1db1d462f877a75d39e26179afab1b2 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:52:27 -0700 Subject: [PATCH 5/9] Reference conda `base` env (not `root`) --- linux-anvil-ppc64le/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-anvil-ppc64le/Dockerfile b/linux-anvil-ppc64le/Dockerfile index ebe50ae..c2bdae1 100644 --- a/linux-anvil-ppc64le/Dockerfile +++ b/linux-anvil-ppc64le/Dockerfile @@ -44,13 +44,13 @@ COPY scripts/run_commands /opt/docker/bin/run_commands RUN /opt/docker/bin/run_commands # Add a file for users to source to activate the `conda` -# environment `root`. Also add a file that wraps that for +# environment `base`. Also add a file that wraps that for # use with the `ENTRYPOINT`. COPY linux-anvil-ppc64le/entrypoint_source /opt/docker/bin/entrypoint_source COPY scripts/entrypoint /opt/docker/bin/entrypoint # Ensure that all containers start with tini and the user selected process. -# Activate the `conda` environment `root`. +# Activate the `conda` environment `base`. # Provide a default command (`bash`), which will start if the user doesn't specify one. ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ] CMD [ "/bin/bash" ] From 31383de4f8bcaf9740adb5bdebad1d95c726bc3f Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:52:28 -0700 Subject: [PATCH 6/9] Drop outdated devtoolset reference --- linux-anvil-aarch64/Dockerfile | 2 +- linux-anvil-cos7-x86_64/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-anvil-aarch64/Dockerfile b/linux-anvil-aarch64/Dockerfile index 97c33b5..b90a2e6 100644 --- a/linux-anvil-aarch64/Dockerfile +++ b/linux-anvil-aarch64/Dockerfile @@ -54,7 +54,7 @@ COPY linux-anvil-aarch64/entrypoint_source /opt/docker/bin/entrypoint_source COPY scripts/entrypoint /opt/docker/bin/entrypoint # Ensure that all containers start with tini and the user selected process. -# Activate the `conda` environment `base` and the devtoolset compiler. +# Activate the `conda` environment `base`. # Provide a default command (`bash`), which will start if the user doesn't specify one. ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ] CMD [ "/bin/bash" ] diff --git a/linux-anvil-cos7-x86_64/Dockerfile b/linux-anvil-cos7-x86_64/Dockerfile index b131d94..f91ae6b 100644 --- a/linux-anvil-cos7-x86_64/Dockerfile +++ b/linux-anvil-cos7-x86_64/Dockerfile @@ -52,7 +52,7 @@ COPY linux-anvil-cos7-x86_64/entrypoint_source /opt/docker/bin/entrypoint_source COPY scripts/entrypoint /opt/docker/bin/entrypoint # Ensure that all containers start with tini and the user selected process. -# Activate the `conda` environment `base` and the devtoolset compiler. +# Activate the `conda` environment `base`. # Provide a default command (`bash`), which will start if the user doesn't specify one. ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ] CMD [ "/bin/bash" ] From de7eef28f3beea30717ed71af5e0eb855c6f6a41 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:52:29 -0700 Subject: [PATCH 7/9] Align on CentOS 7 ARM encoding fix --- linux-anvil-aarch64/Dockerfile | 4 +++- linux-anvil-cos7-x86_64/Dockerfile | 6 ++++++ linux-anvil-ppc64le/Dockerfile | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/linux-anvil-aarch64/Dockerfile b/linux-anvil-aarch64/Dockerfile index b90a2e6..114d4c4 100644 --- a/linux-anvil-aarch64/Dockerfile +++ b/linux-anvil-aarch64/Dockerfile @@ -26,7 +26,9 @@ ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static # (arm64v8/centos:7 only) Fix language override to get a working en_US.UTF-8 locale; backports: # https://github.com/CentOS/sig-cloud-instance-build/commit/2892c17fa8a520e58c3f42cd56587863fe675670 -RUN sed -i 's/override_install_langs=en_US\.UTF-8/override_install_langs=en_US.utf8/' /etc/yum.conf +RUN if [ "${DISTRO_ARCH}" = "arm64" ] && [ "${DISTRO_NAME}${DISTRO_VER}" = "centos7" ]; then \ + sed -i 's/override_install_langs=en_US\.UTF-8/override_install_langs=en_US.utf8/' /etc/yum.conf ; \ + fi # Add the archived repo URL and fix RPM imports ADD centos7-repos /tmp/centos7-repos diff --git a/linux-anvil-cos7-x86_64/Dockerfile b/linux-anvil-cos7-x86_64/Dockerfile index f91ae6b..40e919b 100644 --- a/linux-anvil-cos7-x86_64/Dockerfile +++ b/linux-anvil-cos7-x86_64/Dockerfile @@ -26,6 +26,12 @@ ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static ADD qemu-s390x-static /usr/bin/qemu-s390x-static +# (arm64v8/centos:7 only) Fix language override to get a working en_US.UTF-8 locale; backports: +# https://github.com/CentOS/sig-cloud-instance-build/commit/2892c17fa8a520e58c3f42cd56587863fe675670 +RUN if [ "${DISTRO_ARCH}" = "arm64" ] && [ "${DISTRO_NAME}${DISTRO_VER}" = "centos7" ]; then \ + sed -i 's/override_install_langs=en_US\.UTF-8/override_install_langs=en_US.utf8/' /etc/yum.conf ; \ + fi + # Add the archived repo URL and fix RPM imports ADD centos7-repos /tmp/centos7-repos ADD scripts/fix_rpm /opt/docker/bin/fix_rpm diff --git a/linux-anvil-ppc64le/Dockerfile b/linux-anvil-ppc64le/Dockerfile index c2bdae1..4b794eb 100644 --- a/linux-anvil-ppc64le/Dockerfile +++ b/linux-anvil-ppc64le/Dockerfile @@ -24,6 +24,12 @@ ADD https://loripsum.net/api /opt/docker/etc/gibberish # Add qemu in here so that we can use this image on regular linux hosts with qemu user installed ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static +# (arm64v8/centos:7 only) Fix language override to get a working en_US.UTF-8 locale; backports: +# https://github.com/CentOS/sig-cloud-instance-build/commit/2892c17fa8a520e58c3f42cd56587863fe675670 +RUN if [ "${DISTRO_ARCH}" = "arm64" ] && [ "${DISTRO_NAME}${DISTRO_VER}" = "centos7" ]; then \ + sed -i 's/override_install_langs=en_US\.UTF-8/override_install_langs=en_US.utf8/' /etc/yum.conf ; \ + fi + # Add the archived repo URL and fix RPM imports ADD centos7-repos /tmp/centos7-repos ADD scripts/fix_rpm /opt/docker/bin/fix_rpm From be2e307b71155233c5aee356e1838eb72457e746 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 18:58:52 -0700 Subject: [PATCH 8/9] Use `linux-anvil-cos7` to build all archs --- .github/workflows/ci.yaml | 3 + linux-anvil-aarch64/Dockerfile | 62 ------------------- linux-anvil-cos7-x86_64/entrypoint_source | 2 - .../Dockerfile | 2 +- .../entrypoint_source | 0 linux-anvil-ppc64le/Dockerfile | 62 ------------------- linux-anvil-ppc64le/entrypoint_source | 2 - 7 files changed, 4 insertions(+), 129 deletions(-) delete mode 100644 linux-anvil-aarch64/Dockerfile delete mode 100644 linux-anvil-cos7-x86_64/entrypoint_source rename {linux-anvil-cos7-x86_64 => linux-anvil-cos7}/Dockerfile (96%) rename {linux-anvil-aarch64 => linux-anvil-cos7}/entrypoint_source (100%) delete mode 100644 linux-anvil-ppc64le/Dockerfile delete mode 100644 linux-anvil-ppc64le/entrypoint_source diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 747d4b2..37e55bf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,7 @@ jobs: matrix: cfg: - DOCKERIMAGE: linux-anvil-cos7-x86_64 + DOCKERFILE: linux-anvil-cos7 DOCKERTAG: latest DISTRO_ARCH: "amd64" DISTRO_NAME: "centos" @@ -25,6 +26,7 @@ jobs: SHORT_DESCRIPTION: "conda-forge build image for Cent0S 7 on x86_64" - DOCKERIMAGE: linux-anvil-ppc64le + DOCKERFILE: linux-anvil-cos7 DOCKERTAG: latest DISTRO_ARCH: "ppc64le" DISTRO_NAME: "centos" @@ -32,6 +34,7 @@ jobs: SHORT_DESCRIPTION: "conda-forge build image for Cent0S 7 on ppc64le" - DOCKERIMAGE: linux-anvil-aarch64 + DOCKERFILE: linux-anvil-cos7 DOCKERTAG: latest DISTRO_ARCH: "arm64" DISTRO_NAME: "centos" diff --git a/linux-anvil-aarch64/Dockerfile b/linux-anvil-aarch64/Dockerfile deleted file mode 100644 index 114d4c4..0000000 --- a/linux-anvil-aarch64/Dockerfile +++ /dev/null @@ -1,62 +0,0 @@ -# Set `ARG`s for use in `FROM`. -ARG DISTRO_ARCH -ARG DISTRO_NAME -ARG DISTRO_VER -FROM --platform=linux/${DISTRO_ARCH} ${DISTRO_NAME}:${DISTRO_VER} - -LABEL maintainer="conda-forge " - -# Set `ARG`s during build. -ARG DISTRO_ARCH -ARG DISTRO_NAME -ARG DISTRO_VER -ENV DISTRO_ARCH=${DISTRO_ARCH} \ - DISTRO_NAME=${DISTRO_NAME} \ - DISTRO_VER=${DISTRO_VER} - -# Set an encoding to make things work smoothly. -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US.UTF-8 - -# bust the docker cache so that we always rerun the installs below -ADD https://loripsum.net/api /opt/docker/etc/gibberish - -# Add qemu in here so that we can use this image on regular linux hosts with qemu user installed -ADD qemu-aarch64-static /usr/bin/qemu-aarch64-static - -# (arm64v8/centos:7 only) Fix language override to get a working en_US.UTF-8 locale; backports: -# https://github.com/CentOS/sig-cloud-instance-build/commit/2892c17fa8a520e58c3f42cd56587863fe675670 -RUN if [ "${DISTRO_ARCH}" = "arm64" ] && [ "${DISTRO_NAME}${DISTRO_VER}" = "centos7" ]; then \ - sed -i 's/override_install_langs=en_US\.UTF-8/override_install_langs=en_US.utf8/' /etc/yum.conf ; \ - fi - -# Add the archived repo URL and fix RPM imports -ADD centos7-repos /tmp/centos7-repos -ADD scripts/fix_rpm /opt/docker/bin/fix_rpm -RUN /opt/docker/bin/fix_rpm - -# Install basic requirements. -COPY scripts/yum_clean_all /opt/docker/bin/ -RUN yum update -y && \ - yum install -y \ - bzip2 \ - sudo \ - tar \ - which && \ - /opt/docker/bin/yum_clean_all - -# Run common commands -COPY scripts/run_commands /opt/docker/bin/run_commands -RUN /opt/docker/bin/run_commands - -# Add a file for users to source to activate the `conda` -# environment `base`. Also add a file that wraps that for -# use with the `ENTRYPOINT`. -COPY linux-anvil-aarch64/entrypoint_source /opt/docker/bin/entrypoint_source -COPY scripts/entrypoint /opt/docker/bin/entrypoint - -# Ensure that all containers start with tini and the user selected process. -# Activate the `conda` environment `base`. -# Provide a default command (`bash`), which will start if the user doesn't specify one. -ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ] -CMD [ "/bin/bash" ] diff --git a/linux-anvil-cos7-x86_64/entrypoint_source b/linux-anvil-cos7-x86_64/entrypoint_source deleted file mode 100644 index 6dfd421..0000000 --- a/linux-anvil-cos7-x86_64/entrypoint_source +++ /dev/null @@ -1,2 +0,0 @@ -# Activate the `base` conda environment. -conda activate base diff --git a/linux-anvil-cos7-x86_64/Dockerfile b/linux-anvil-cos7/Dockerfile similarity index 96% rename from linux-anvil-cos7-x86_64/Dockerfile rename to linux-anvil-cos7/Dockerfile index 40e919b..63d697f 100644 --- a/linux-anvil-cos7-x86_64/Dockerfile +++ b/linux-anvil-cos7/Dockerfile @@ -54,7 +54,7 @@ RUN /opt/docker/bin/run_commands # Add a file for users to source to activate the `conda` # environment `base`. Also add a file that wraps that for # use with the `ENTRYPOINT`. -COPY linux-anvil-cos7-x86_64/entrypoint_source /opt/docker/bin/entrypoint_source +COPY linux-anvil-cos7/entrypoint_source /opt/docker/bin/entrypoint_source COPY scripts/entrypoint /opt/docker/bin/entrypoint # Ensure that all containers start with tini and the user selected process. diff --git a/linux-anvil-aarch64/entrypoint_source b/linux-anvil-cos7/entrypoint_source similarity index 100% rename from linux-anvil-aarch64/entrypoint_source rename to linux-anvil-cos7/entrypoint_source diff --git a/linux-anvil-ppc64le/Dockerfile b/linux-anvil-ppc64le/Dockerfile deleted file mode 100644 index 4b794eb..0000000 --- a/linux-anvil-ppc64le/Dockerfile +++ /dev/null @@ -1,62 +0,0 @@ -# Set `ARG`s for use in `FROM`. -ARG DISTRO_ARCH -ARG DISTRO_NAME -ARG DISTRO_VER -FROM --platform=linux/${DISTRO_ARCH} ${DISTRO_NAME}:${DISTRO_VER} - -LABEL maintainer="conda-forge " - -# Set `ARG`s during build. -ARG DISTRO_ARCH -ARG DISTRO_NAME -ARG DISTRO_VER -ENV DISTRO_ARCH=${DISTRO_ARCH} \ - DISTRO_NAME=${DISTRO_NAME} \ - DISTRO_VER=${DISTRO_VER} - -# Set an encoding to make things work smoothly. -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US.UTF-8 - -# bust the docker cache so that we always rerun the installs below -ADD https://loripsum.net/api /opt/docker/etc/gibberish - -# Add qemu in here so that we can use this image on regular linux hosts with qemu user installed -ADD qemu-ppc64le-static /usr/bin/qemu-ppc64le-static - -# (arm64v8/centos:7 only) Fix language override to get a working en_US.UTF-8 locale; backports: -# https://github.com/CentOS/sig-cloud-instance-build/commit/2892c17fa8a520e58c3f42cd56587863fe675670 -RUN if [ "${DISTRO_ARCH}" = "arm64" ] && [ "${DISTRO_NAME}${DISTRO_VER}" = "centos7" ]; then \ - sed -i 's/override_install_langs=en_US\.UTF-8/override_install_langs=en_US.utf8/' /etc/yum.conf ; \ - fi - -# Add the archived repo URL and fix RPM imports -ADD centos7-repos /tmp/centos7-repos -ADD scripts/fix_rpm /opt/docker/bin/fix_rpm -RUN /opt/docker/bin/fix_rpm - -# Install basic requirements. -COPY scripts/yum_clean_all /opt/docker/bin/ -RUN yum update -y && \ - yum install -y \ - bzip2 \ - sudo \ - tar \ - which && \ - /opt/docker/bin/yum_clean_all - -# Run common commands -COPY scripts/run_commands /opt/docker/bin/run_commands -RUN /opt/docker/bin/run_commands - -# Add a file for users to source to activate the `conda` -# environment `base`. Also add a file that wraps that for -# use with the `ENTRYPOINT`. -COPY linux-anvil-ppc64le/entrypoint_source /opt/docker/bin/entrypoint_source -COPY scripts/entrypoint /opt/docker/bin/entrypoint - -# Ensure that all containers start with tini and the user selected process. -# Activate the `conda` environment `base`. -# Provide a default command (`bash`), which will start if the user doesn't specify one. -ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ] -CMD [ "/bin/bash" ] diff --git a/linux-anvil-ppc64le/entrypoint_source b/linux-anvil-ppc64le/entrypoint_source deleted file mode 100644 index 6dfd421..0000000 --- a/linux-anvil-ppc64le/entrypoint_source +++ /dev/null @@ -1,2 +0,0 @@ -# Activate the `base` conda environment. -conda activate base From 12ee4c66bc7b96b8ed717f5926660819a1fc3f3b Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Jul 2024 19:59:55 -0700 Subject: [PATCH 9/9] Fix comment reference conda env --- .circleci/test_docker_container.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test_docker_container.sh b/.circleci/test_docker_container.sh index 6e52c31..2efbd75 100755 --- a/.circleci/test_docker_container.sh +++ b/.circleci/test_docker_container.sh @@ -14,7 +14,7 @@ touch /opt/conda/bin/test_conda_forge # check that conda is activated conda info -# show all packages installed in root +# show all packages installed in base conda list # check that we can install a conda package