From e8df50cbc6f1f62d54cbb1341dcaf6b2b5b96062 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sun, 3 Nov 2024 23:41:13 +0100 Subject: [PATCH] chore: use manylinux2014_base base image for manylinux2014 (#1705) With CentOS 7 having reach EOL, packages versions are now immutable. Using a base image with manylinux runtime packages allows to reduce image size and improve cache efficiency. --- build.sh | 6 +----- docker/build_scripts/install-runtime-packages.sh | 6 ++++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index b9c78b99..6ec2c117 100755 --- a/build.sh +++ b/build.sh @@ -37,11 +37,7 @@ fi # setup BASEIMAGE and its specific properties if [ "${POLICY}" == "manylinux2014" ]; then - if [ "${PLATFORM}" == "s390x" ]; then - BASEIMAGE="s390x/clefos:7" - else - BASEIMAGE="${MULTIARCH_PREFIX}centos:7" - fi + BASEIMAGE="quay.io/pypa/manylinux2014_base:2024.11.03-3" DEVTOOLSET_ROOTPATH="/opt/rh/devtoolset-10/root" PREPEND_PATH="${DEVTOOLSET_ROOTPATH}/usr/bin:" if [ "${PLATFORM}" == "i686" ]; then diff --git a/docker/build_scripts/install-runtime-packages.sh b/docker/build_scripts/install-runtime-packages.sh index 09e08e95..160b335b 100755 --- a/docker/build_scripts/install-runtime-packages.sh +++ b/docker/build_scripts/install-runtime-packages.sh @@ -88,8 +88,10 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then # Software collection (for devtoolset-10) yum -y install centos-release-scl-rh - # EPEL support (for yasm) - yum -y install https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm + if ! rpm -q epel-release-7-14.noarch; then + # EPEL support (for yasm) + yum -y install https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm + fi TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm" elif [ "${AUDITWHEEL_ARCH}" == "aarch64" ] || [ "${AUDITWHEEL_ARCH}" == "ppc64le" ] || [ "${AUDITWHEEL_ARCH}" == "s390x" ]; then # Software collection (for devtoolset-10)