From 223d9ed5f8245c739d40389828bbc90b6196c3ef Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 13:47:32 -0700 Subject: [PATCH 01/16] Add manylinux_2_28 image --- .github/workflows/build-manywheel-images.yml | 15 ++ manywheel/Dockerfile_manylinux_2_28 | 146 +++++++++++++++++++ manywheel/build_docker.sh | 8 + 3 files changed, 169 insertions(+) create mode 100644 manywheel/Dockerfile_manylinux_2_28 diff --git a/.github/workflows/build-manywheel-images.yml b/.github/workflows/build-manywheel-images.yml index a599635f8..f308edcac 100644 --- a/.github/workflows/build-manywheel-images.yml +++ b/.github/workflows/build-manywheel-images.yml @@ -107,6 +107,21 @@ jobs: - name: Build Docker Image run: | manywheel/build_docker.sh + build-docker-cpu-manylinux_2_28: + runs-on: ubuntu-22.04 + env: + GPU_ARCH_TYPE: cpu-manylinux_2_28 + steps: + - name: Checkout PyTorch + uses: actions/checkout@v3 + - name: Authenticate if WITH_PUSH + run: | + if [[ "${WITH_PUSH}" == true ]]; then + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_ID}" --password-stdin + fi + - name: Build Docker Image + run: | + manywheel/build_docker.sh build-docker-cpu-aarch64: runs-on: linux.arm64.2xlarge env: diff --git a/manywheel/Dockerfile_manylinux_2_28 b/manywheel/Dockerfile_manylinux_2_28 new file mode 100644 index 000000000..d29d517fc --- /dev/null +++ b/manywheel/Dockerfile_manylinux_2_28 @@ -0,0 +1,146 @@ +# syntax = docker/dockerfile:experimental +ARG ROCM_VERSION=3.7 +ARG BASE_CUDA_VERSION=10.2 +ARG GPU_IMAGE=nvidia/cuda:${BASE_CUDA_VERSION}-devel-centos7 +FROM quay.io/pypa/manylinux_2_28_x86_64 as base + +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 + +RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel +RUN yum install -y yum-utils centos-release-scl +RUN yum-config-manager --enable rhel-server-rhscl-7-rpms +RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils +ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH + +# cmake +RUN yum install -y cmake3 && \ + ln -s /usr/bin/cmake3 /usr/bin/cmake +FROM base as openssl +# Install openssl (this must precede `build python` step) +# (In order to have a proper SSL module, Python is compiled +# against a recent openssl [see env vars above], which is linked +# statically. We delete openssl afterwards.) +ADD ./common/install_openssl.sh install_openssl.sh +RUN bash ./install_openssl.sh && rm install_openssl.sh + + + +# remove unncessary python versions +RUN rm -rf /opt/python/cp26-cp26m /opt/_internal/cpython-2.6.9-ucs2 +RUN rm -rf /opt/python/cp26-cp26mu /opt/_internal/cpython-2.6.9-ucs4 +RUN rm -rf /opt/python/cp33-cp33m /opt/_internal/cpython-3.3.6 +RUN rm -rf /opt/python/cp34-cp34m /opt/_internal/cpython-3.4.6 + +FROM base as cuda +ARG BASE_CUDA_VERSION=10.2 +# Install CUDA +ADD ./common/install_cuda.sh install_cuda.sh +RUN bash ./install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh + +FROM base as intel +# MKL +ADD ./common/install_mkl.sh install_mkl.sh +RUN bash ./install_mkl.sh && rm install_mkl.sh + +FROM base as magma +ARG BASE_CUDA_VERSION=10.2 +# Install magma +ADD ./common/install_magma.sh install_magma.sh +RUN bash ./install_magma.sh ${BASE_CUDA_VERSION} && rm install_magma.sh + +FROM base as jni +# Install java jni header +ADD ./common/install_jni.sh install_jni.sh +ADD ./java/jni.h jni.h +RUN bash ./install_jni.sh && rm install_jni.sh + +FROM base as libpng +# Install libpng +ADD ./common/install_libpng.sh install_libpng.sh +RUN bash ./install_libpng.sh && rm install_libpng.sh + +FROM ${GPU_IMAGE} as common +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 +RUN yum install -y \ + aclocal \ + autoconf \ + automake \ + bison \ + bzip2 \ + curl \ + diffutils \ + file \ + git \ + make \ + patch \ + perl \ + unzip \ + util-linux \ + wget \ + which \ + xz \ + yasm +RUN yum install -y \ + https://repo.ius.io/ius-release-el7.rpm \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +RUN yum swap -y git git236-core +# git236+ would refuse to run git commands in repos owned by other users +# Which causes version check to fail, as pytorch repo is bind-mounted into the image +# Override this behaviour by treating every folder as safe +# For more details see https://github.com/pytorch/pytorch/issues/78659#issuecomment-1144107327 +RUN git config --global --add safe.directory "*" + +ENV SSL_CERT_FILE=/opt/_internal/certs.pem +# Install LLVM version +COPY --from=openssl /opt/openssl /opt/openssl +COPY --from=base /opt/python /opt/python +COPY --from=base /opt/_internal /opt/_internal +COPY --from=base /usr/local/bin/auditwheel /usr/local/bin/auditwheel +COPY --from=intel /opt/intel /opt/intel +COPY --from=base /usr/local/bin/patchelf /usr/local/bin/patchelf +COPY --from=libpng /usr/local/bin/png* /usr/local/bin/ +COPY --from=libpng /usr/local/bin/libpng* /usr/local/bin/ +COPY --from=libpng /usr/local/include/png* /usr/local/include/ +COPY --from=libpng /usr/local/include/libpng* /usr/local/include/ +COPY --from=libpng /usr/local/lib/libpng* /usr/local/lib/ +COPY --from=libpng /usr/local/lib/pkgconfig /usr/local/lib/pkgconfig +COPY --from=jni /usr/local/include/jni.h /usr/local/include/jni.h + +FROM common as cpu_final +ARG BASE_CUDA_VERSION=10.2 +RUN yum install -y yum-utils centos-release-scl +RUN yum-config-manager --enable rhel-server-rhscl-7-rpms +RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils +ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH + +# cmake +RUN yum install -y cmake3 && \ + ln -s /usr/bin/cmake3 /usr/bin/cmake + +# ninja +RUN yum install -y http://repo.okay.com.mx/centos/7/x86_64/release/okay-release-1-1.noarch.rpm +RUN yum install -y ninja-build + +FROM cpu_final as cuda_final +RUN rm -rf /usr/local/cuda-${BASE_CUDA_VERSION} +COPY --from=cuda /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION} +COPY --from=magma /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION} + +FROM common as rocm_final +ARG ROCM_VERSION=3.7 +# Install ROCm +ADD ./common/install_rocm.sh install_rocm.sh +RUN bash ./install_rocm.sh ${ROCM_VERSION} && rm install_rocm.sh +# cmake is already installed inside the rocm base image, but both 2 and 3 exist +# cmake3 is needed for the later MIOpen custom build, so that step is last. +RUN yum install -y cmake3 && \ + rm -f /usr/bin/cmake && \ + ln -s /usr/bin/cmake3 /usr/bin/cmake +ADD ./common/install_miopen.sh install_miopen.sh +RUN bash ./install_miopen.sh ${ROCM_VERSION} && rm install_miopen.sh diff --git a/manywheel/build_docker.sh b/manywheel/build_docker.sh index 4d3816588..9e533100d 100755 --- a/manywheel/build_docker.sh +++ b/manywheel/build_docker.sh @@ -20,6 +20,14 @@ case ${GPU_ARCH_TYPE} in GPU_IMAGE=centos:7 DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=9" ;; + cpu-manylinux_2_28) + TARGET=cpu_final + DOCKER_TAG=cpu + LEGACY_DOCKER_IMAGE=${DOCKER_REGISTRY}/pytorch/manylinux_2_28-cpu + GPU_IMAGE=amd64/almalinux:8 + DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=11" + MANY_LINUX_VERSION="_2_28" + ;; cpu-aarch64) TARGET=final DOCKER_TAG=cpu-aarch64 From d15eff6ca907a171c22f266cc9d7602d7ac722f5 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 13:51:19 -0700 Subject: [PATCH 02/16] test --- manywheel/build_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manywheel/build_docker.sh b/manywheel/build_docker.sh index 9e533100d..05f3dad81 100755 --- a/manywheel/build_docker.sh +++ b/manywheel/build_docker.sh @@ -26,7 +26,7 @@ case ${GPU_ARCH_TYPE} in LEGACY_DOCKER_IMAGE=${DOCKER_REGISTRY}/pytorch/manylinux_2_28-cpu GPU_IMAGE=amd64/almalinux:8 DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=11" - MANY_LINUX_VERSION="_2_28" + MANY_LINUX_VERSION="2_28" ;; cpu-aarch64) TARGET=final From 47879b2900f9c4c2ce89619b2d958befb4956f3c Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 13:55:15 -0700 Subject: [PATCH 03/16] test --- manywheel/{Dockerfile_manylinux_2_28 => Dockerfile_2_28} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename manywheel/{Dockerfile_manylinux_2_28 => Dockerfile_2_28} (100%) diff --git a/manywheel/Dockerfile_manylinux_2_28 b/manywheel/Dockerfile_2_28 similarity index 100% rename from manywheel/Dockerfile_manylinux_2_28 rename to manywheel/Dockerfile_2_28 From 0879ce3cc664234ae3efccbc849286bccced7919 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 14:11:01 -0700 Subject: [PATCH 04/16] test --- manywheel/Dockerfile_2_28 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index d29d517fc..87809874b 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -66,8 +66,9 @@ FROM ${GPU_IMAGE} as common ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 +RUN yum -y install epel-release +RUN yum -y update RUN yum install -y \ - aclocal \ autoconf \ automake \ bison \ From ee6500889cf0ecb88b6d49883b592333d81ccb84 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 14:25:29 -0700 Subject: [PATCH 05/16] test --- manywheel/Dockerfile_2_28 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 87809874b..25de0e8c7 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -84,8 +84,7 @@ RUN yum install -y \ util-linux \ wget \ which \ - xz \ - yasm + xz RUN yum install -y \ https://repo.ius.io/ius-release-el7.rpm \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm From c5a821b52985e8e2c7ef930c7e5bc659e51955ed Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 14:30:24 -0700 Subject: [PATCH 06/16] test --- manywheel/Dockerfile_2_28 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 25de0e8c7..8471a325e 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -113,7 +113,6 @@ COPY --from=jni /usr/local/include/jni.h /usr/local/ FROM common as cpu_final ARG BASE_CUDA_VERSION=10.2 -RUN yum install -y yum-utils centos-release-scl RUN yum-config-manager --enable rhel-server-rhscl-7-rpms RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH @@ -123,9 +122,6 @@ ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/roo RUN yum install -y cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake -# ninja -RUN yum install -y http://repo.okay.com.mx/centos/7/x86_64/release/okay-release-1-1.noarch.rpm -RUN yum install -y ninja-build FROM cpu_final as cuda_final RUN rm -rf /usr/local/cuda-${BASE_CUDA_VERSION} From 5419225a080dbbadd35f7984651f2888c2c7bb8d Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 14:47:51 -0700 Subject: [PATCH 07/16] test --- manywheel/Dockerfile_2_28 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 8471a325e..a0d3ef69a 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -9,7 +9,7 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel -RUN yum install -y yum-utils centos-release-scl +RUN yum install -y yum-utils RUN yum-config-manager --enable rhel-server-rhscl-7-rpms RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH From 889c335d68b985451fa5ce0d084dd5724b22c192 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 15:04:20 -0700 Subject: [PATCH 08/16] test --- manywheel/Dockerfile_2_28 | 1 - 1 file changed, 1 deletion(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index a0d3ef69a..eb946cc1b 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -113,7 +113,6 @@ COPY --from=jni /usr/local/include/jni.h /usr/local/ FROM common as cpu_final ARG BASE_CUDA_VERSION=10.2 -RUN yum-config-manager --enable rhel-server-rhscl-7-rpms RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH From d26c72bd8d0aac97e38671aef9c372eee9a76594 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 9 May 2024 15:08:47 -0700 Subject: [PATCH 09/16] tets --- manywheel/Dockerfile_2_28 | 2 -- 1 file changed, 2 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index eb946cc1b..846a22ee1 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -10,7 +10,6 @@ ENV LANGUAGE en_US.UTF-8 RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel RUN yum install -y yum-utils -RUN yum-config-manager --enable rhel-server-rhscl-7-rpms RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH @@ -27,7 +26,6 @@ ADD ./common/install_openssl.sh install_openssl.sh RUN bash ./install_openssl.sh && rm install_openssl.sh - # remove unncessary python versions RUN rm -rf /opt/python/cp26-cp26m /opt/_internal/cpython-2.6.9-ucs2 RUN rm -rf /opt/python/cp26-cp26mu /opt/_internal/cpython-2.6.9-ucs4 From 32be4ddac3072d971e8a12ea487b1b3f9d6eb096 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 10 May 2024 07:46:39 -0700 Subject: [PATCH 10/16] test --- manywheel/Dockerfile_2_28 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 846a22ee1..86954a026 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -10,9 +10,9 @@ ENV LANGUAGE en_US.UTF-8 RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel RUN yum install -y yum-utils -RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils -ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH +RUN yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran devtoolset-11-binutils +ENV PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:$LD_LIBRARY_PATH # cmake RUN yum install -y cmake3 && \ @@ -111,9 +111,9 @@ COPY --from=jni /usr/local/include/jni.h /usr/local/ FROM common as cpu_final ARG BASE_CUDA_VERSION=10.2 -RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils -ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH +RUN yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran devtoolset-11-binutils +ENV PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:$LD_LIBRARY_PATH # cmake RUN yum install -y cmake3 && \ From 700b05148a62330ff6469bcdcd165732e1f02029 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 10 May 2024 08:01:16 -0700 Subject: [PATCH 11/16] test --- manywheel/Dockerfile_2_28 | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 86954a026..6bc20deea 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -4,15 +4,19 @@ ARG BASE_CUDA_VERSION=10.2 ARG GPU_IMAGE=nvidia/cuda:${BASE_CUDA_VERSION}-devel-centos7 FROM quay.io/pypa/manylinux_2_28_x86_64 as base +ARG GCCTOOLSET_VERSION=11 + ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel +RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel gcc-toolset-${GCCTOOLSET_VERSION}-toolchain RUN yum install -y yum-utils -RUN yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran devtoolset-11-binutils -ENV PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:$LD_LIBRARY_PATH + +# Ensure the expected devtoolset is used +ENV PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH + # cmake RUN yum install -y cmake3 && \ @@ -82,7 +86,9 @@ RUN yum install -y \ util-linux \ wget \ which \ - xz + xz \ + gcc-toolset-${GCCTOOLSET_VERSION}-toolchain + RUN yum install -y \ https://repo.ius.io/ius-release-el7.rpm \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm @@ -111,10 +117,9 @@ COPY --from=jni /usr/local/include/jni.h /usr/local/ FROM common as cpu_final ARG BASE_CUDA_VERSION=10.2 -RUN yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran devtoolset-11-binutils -ENV PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:$LD_LIBRARY_PATH - +# Ensure the expected devtoolset is used +ENV PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH # cmake RUN yum install -y cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake From 765ce766e6276ec8f61a8f33e0ada09b1e244ec5 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 10 May 2024 08:03:15 -0700 Subject: [PATCH 12/16] test --- manywheel/Dockerfile_2_28 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 6bc20deea..3944c1eeb 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -4,7 +4,7 @@ ARG BASE_CUDA_VERSION=10.2 ARG GPU_IMAGE=nvidia/cuda:${BASE_CUDA_VERSION}-devel-centos7 FROM quay.io/pypa/manylinux_2_28_x86_64 as base -ARG GCCTOOLSET_VERSION=11 +ENV GCCTOOLSET_VERSION=11 ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 From 57b44c8f63e2544d2a387f7bb8a594b5699efb8b Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 10 May 2024 08:06:23 -0700 Subject: [PATCH 13/16] test --- manywheel/Dockerfile_2_28 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 3944c1eeb..be7ff6960 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -4,18 +4,18 @@ ARG BASE_CUDA_VERSION=10.2 ARG GPU_IMAGE=nvidia/cuda:${BASE_CUDA_VERSION}-devel-centos7 FROM quay.io/pypa/manylinux_2_28_x86_64 as base -ENV GCCTOOLSET_VERSION=11 +ARG DEVTOOLSET_VERSION=11 ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel gcc-toolset-${GCCTOOLSET_VERSION}-toolchain +RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel gcc-toolset-${DEVTOOLSET_VERSION}-toolchain RUN yum install -y yum-utils # Ensure the expected devtoolset is used -ENV PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH +ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH # cmake @@ -87,7 +87,7 @@ RUN yum install -y \ wget \ which \ xz \ - gcc-toolset-${GCCTOOLSET_VERSION}-toolchain + gcc-toolset-${DEVTOOLSET_VERSION}-toolchain RUN yum install -y \ https://repo.ius.io/ius-release-el7.rpm \ @@ -117,9 +117,10 @@ COPY --from=jni /usr/local/include/jni.h /usr/local/ FROM common as cpu_final ARG BASE_CUDA_VERSION=10.2 +ARG DEVTOOLSET_VERSION=11 # Ensure the expected devtoolset is used -ENV PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/bin:$PATH -ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${GCCTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH +ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH +ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH # cmake RUN yum install -y cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake From d4748824c3ae4090cd6dc073c6b83cb88fd53cc5 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 10 May 2024 08:10:22 -0700 Subject: [PATCH 14/16] test --- manywheel/Dockerfile_2_28 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index be7ff6960..61ae4e4fc 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -4,16 +4,12 @@ ARG BASE_CUDA_VERSION=10.2 ARG GPU_IMAGE=nvidia/cuda:${BASE_CUDA_VERSION}-devel-centos7 FROM quay.io/pypa/manylinux_2_28_x86_64 as base -ARG DEVTOOLSET_VERSION=11 - ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel gcc-toolset-${DEVTOOLSET_VERSION}-toolchain -RUN yum install -y yum-utils - -# Ensure the expected devtoolset is used +ARG DEVTOOLSET_VERSION=11 +RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel yum-utils gcc-toolset-${DEVTOOLSET_VERSION}-toolchain ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH @@ -65,6 +61,7 @@ ADD ./common/install_libpng.sh install_libpng.sh RUN bash ./install_libpng.sh && rm install_libpng.sh FROM ${GPU_IMAGE} as common +ARG DEVTOOLSET_VERSION=11 ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 From 5b48ed57ad3e4366410a43738c7bddba24384b34 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 10 May 2024 08:14:04 -0700 Subject: [PATCH 15/16] test --- manywheel/Dockerfile_2_28 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 61ae4e4fc..d7825ead9 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -13,10 +13,11 @@ RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib- ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH +# cmake-3.18.4 from pip +RUN yum install -y python3-pip && \ + python3 -mpip install cmake==3.18.4 && \ + ln -s /usr/local/bin/cmake /usr/bin/cmake -# cmake -RUN yum install -y cmake3 && \ - ln -s /usr/bin/cmake3 /usr/bin/cmake FROM base as openssl # Install openssl (this must precede `build python` step) # (In order to have a proper SSL module, Python is compiled From 0243443f7b2ada14096f68ecfb70c3e6f9f6388e Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 10 May 2024 09:09:46 -0700 Subject: [PATCH 16/16] test --- manywheel/Dockerfile_2_28 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index d7825ead9..6566f115d 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -1,7 +1,7 @@ # syntax = docker/dockerfile:experimental ARG ROCM_VERSION=3.7 -ARG BASE_CUDA_VERSION=10.2 -ARG GPU_IMAGE=nvidia/cuda:${BASE_CUDA_VERSION}-devel-centos7 +ARG BASE_CUDA_VERSION=11.8 +ARG GPU_IMAGE=amd64/almalinux:8 FROM quay.io/pypa/manylinux_2_28_x86_64 as base ENV LC_ALL en_US.UTF-8 @@ -34,7 +34,7 @@ RUN rm -rf /opt/python/cp33-cp33m /opt/_internal/cpython-3.3.6 RUN rm -rf /opt/python/cp34-cp34m /opt/_internal/cpython-3.4.6 FROM base as cuda -ARG BASE_CUDA_VERSION=10.2 +ARG BASE_CUDA_VERSION=11.8 # Install CUDA ADD ./common/install_cuda.sh install_cuda.sh RUN bash ./install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh @@ -114,7 +114,7 @@ COPY --from=libpng /usr/local/lib/pkgconfig /usr/local/ COPY --from=jni /usr/local/include/jni.h /usr/local/include/jni.h FROM common as cpu_final -ARG BASE_CUDA_VERSION=10.2 +ARG BASE_CUDA_VERSION=11.8 ARG DEVTOOLSET_VERSION=11 # Ensure the expected devtoolset is used ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH