Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate cos7 and alma8 docker files #287

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ jobs:
matrix:
cfg:
- DOCKERIMAGE: linux-anvil-cos7-x86_64
DOCKERFILE: linux-anvil-cos7
DOCKERFILE: linux-anvil
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
DOCKERFILE: linux-anvil-cos7
DOCKERFILE: linux-anvil
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
DOCKERFILE: linux-anvil-cos7
DOCKERFILE: linux-anvil
DOCKERTAG: latest
DISTRO_ARCH: "arm64"
DISTRO_NAME: "centos"
Expand Down Expand Up @@ -69,23 +69,23 @@ jobs:
SHORT_DESCRIPTION: "conda-forge build image for Cent0S 8 on aarch64 with CUDA"

- DOCKERIMAGE: linux-anvil-alma-x86_64
DOCKERFILE: linux-anvil-alma
DOCKERFILE: linux-anvil
DOCKERTAG: "8"
DISTRO_ARCH: "amd64"
DISTRO_NAME: "almalinux"
DISTRO_VER: "8"
SHORT_DESCRIPTION: "conda-forge build image for Alma 8 on x86_64"

- DOCKERIMAGE: linux-anvil-alma-aarch64
DOCKERFILE: linux-anvil-alma
DOCKERFILE: linux-anvil
DOCKERTAG: "8"
DISTRO_ARCH: "arm64"
DISTRO_NAME: "almalinux"
DISTRO_VER: "8"
SHORT_DESCRIPTION: "conda-forge build image for Alma 8 on aarch64"

- DOCKERIMAGE: linux-anvil-alma-ppc64le
DOCKERFILE: linux-anvil-alma
DOCKERFILE: linux-anvil
DOCKERTAG: "8"
DISTRO_ARCH: "ppc64le"
DISTRO_NAME: "almalinux"
Expand Down
55 changes: 0 additions & 55 deletions linux-anvil-alma/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions linux-anvil-cos7/entrypoint_source

This file was deleted.

2 changes: 1 addition & 1 deletion linux-anvil-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN ldconfig -v 2>/dev/null | grep -v ^$'\t' | cut -f1 -d":" >> /etc/ld.so.conf.
ldconfig

# Add the archived repo URL and fix RPM imports
ADD centos7-repos /tmp/centos7-repos
ADD rpm-repos /tmp/rpm-repos
ADD scripts/fix_rpm /opt/docker/bin/fix_rpm
RUN /opt/docker/bin/fix_rpm

Expand Down
12 changes: 8 additions & 4 deletions linux-anvil-cos7/Dockerfile → linux-anvil/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@ RUN if [ "${DISTRO_ARCH}" = "arm64" ] && [ "${DISTRO_NAME}${DISTRO_VER}" = "cent
fi

# Add the archived repo URL and fix RPM imports
ADD centos7-repos /tmp/centos7-repos
ADD rpm-repos /tmp/rpm-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 && \
RUN if [ "${DISTRO_NAME}${DISTRO_VER}" = "almalinux8" ]; then \
EXTRA_YUM_PKGS="glibc-minimal-langpack glibc-langpack-en"; \
fi && \
yum update -y && \
yum install -y \
bzip2 \
sudo \
tar \
which && \
which \
${EXTRA_YUM_PKGS:-} && \
/opt/docker/bin/yum_clean_all

# Run common commands
Expand All @@ -54,7 +58,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/entrypoint_source /opt/docker/bin/entrypoint_source
COPY linux-anvil/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.
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions scripts/fix_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -exo pipefail
if [[ "${DISTRO_NAME}${DISTRO_VER}" == "centos7" ]]; then
# Disable outdated repos; use vault instead
sed -i '/^enabled=/d; /^\[/a\enabled=0' /etc/yum.repos.d/CentOS-Base.repo
cp "/tmp/centos7-repos/centos7-$(uname -m)-vault.repo" /etc/yum.repos.d/vault.repo
cp "/tmp/rpm-repos/centos7-$(uname -m)-vault.repo" /etc/yum.repos.d/vault.repo

# Resolves a nasty NOKEY warning that appears when using yum.
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Expand All @@ -16,6 +16,8 @@ if [[ "${DISTRO_NAME}${DISTRO_VER}" == "centos7" ]]; then
fi
elif [ "${DISTRO_NAME}${DISTRO_VER}" = "ubi8" ]; then
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
elif [ "${DISTRO_NAME}${DISTRO_VER}" = "almalinux8" ]; then
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
fi

rm -rf "/tmp/centos7-repos"
rm -rf "/tmp/rpm-repos"