Skip to content

Commit

Permalink
[CI] Migrate to rockylinux8 / manylinux_2_28_x86_64 (#10399)
Browse files Browse the repository at this point in the history
* [CI] Migrate to rockylinux8 / manylinux_2_28_x86_64

* Scrub all references to CentOS 7

* Fix

* Remove use of yum

* Use gcc-10 in cpu

* Temporarily disable -Werror

* Use GCC 9 for now

* Roll back gRPC

* Scrub all references to manylinux2014_x86_64

* Revise rename_whl.py to handle no-op rename

* Change JDK_VERSION back to 8

* Reviewer's comment

* Use GCC 10

* Use Spark 3.5.1, same as in pom.xml

* Fix JAR install
  • Loading branch information
hcho3 authored Jun 17, 2024
1 parent 320e7c2 commit bc3747b
Show file tree
Hide file tree
Showing 27 changed files with 136 additions and 171 deletions.
4 changes: 2 additions & 2 deletions dev/release-artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def download_py_packages(
) -> None:
platforms = [
"win_amd64",
"manylinux2014_x86_64",
"manylinux2014_aarch64",
"manylinux_2_28_x86_64",
"manylinux_2_28_aarch64",
"macosx_10_15_x86_64.macosx_11_0_x86_64.macosx_12_0_x86_64",
"macosx_12_0_arm64",
]
Expand Down
7 changes: 0 additions & 7 deletions python-package/xgboost/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,6 @@ def skip_win() -> PytestSkip:
return {"reason": "Unsupported platform.", "condition": is_windows()}


def skip_s390x() -> PytestSkip:
condition = platform.machine() == "s390x"
reason = "Known to fail on s390x"
return {"condition": condition, "reason": reason}


class IteratorForTest(xgb.core.DataIter):
"""Iterator for testing streaming DMatrix. (external memory, quantile)"""

Expand Down Expand Up @@ -523,7 +517,6 @@ def make_sparse_regression(
"""
if not hasattr(np.random, "default_rng"):
# old version of numpy on s390x
rng = np.random.RandomState(1994)
X = sparse.random(
m=n_samples,
Expand Down
2 changes: 1 addition & 1 deletion tests/buildkite/build-containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ case "${container}" in
cpu)
;;

gpu|gpu_build_centos7)
gpu|gpu_build_rockylinux8)
BUILD_ARGS="$BUILD_ARGS --build-arg CUDA_VERSION_ARG=$CUDA_VERSION"
BUILD_ARGS="$BUILD_ARGS --build-arg NCCL_VERSION_ARG=$NCCL_VERSION"
BUILD_ARGS="$BUILD_ARGS --build-arg RAPIDS_VERSION_ARG=$RAPIDS_VERSION"
Expand Down
4 changes: 2 additions & 2 deletions tests/buildkite/build-cpu-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

WHEEL_TAG=manylinux2014_aarch64
WHEEL_TAG=manylinux_2_28_aarch64

echo "--- Build CPU code targeting ARM64"

Expand All @@ -24,7 +24,7 @@ $command_wrapper python tests/ci_build/rename_whl.py \
--commit-hash ${BUILDKITE_COMMIT} \
--platform-tag ${WHEEL_TAG}

echo "--- Audit binary wheel to ensure it's compliant with manylinux2014 standard"
echo "--- Audit binary wheel to ensure it's compliant with ${WHEEL_TAG} standard"
$command_wrapper auditwheel repair --plat ${WHEEL_TAG} python-package/dist/*.whl
$command_wrapper python tests/ci_build/rename_whl.py \
--wheel-path wheelhouse/*.whl \
Expand Down
6 changes: 3 additions & 3 deletions tests/buildkite/build-cuda-with-rmm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

WHEEL_TAG=manylinux2014_x86_64
WHEEL_TAG=manylinux_2_28_x86_64

source tests/buildkite/conftest.sh

Expand All @@ -15,7 +15,7 @@ else
arch_flag=""
fi

command_wrapper="tests/ci_build/ci_build.sh gpu_build_centos7 --build-arg "`
command_wrapper="tests/ci_build/ci_build.sh gpu_build_rockylinux8 --build-arg "`
`"CUDA_VERSION_ARG=$CUDA_VERSION --build-arg "`
`"NCCL_VERSION_ARG=$NCCL_VERSION --build-arg "`
`"RAPIDS_VERSION_ARG=$RAPIDS_VERSION"
Expand All @@ -41,7 +41,7 @@ $command_wrapper python tests/ci_build/rename_whl.py \
--commit-hash ${BUILDKITE_COMMIT} \
--platform-tag ${WHEEL_TAG}

echo "--- Audit binary wheel to ensure it's compliant with manylinux2014 standard"
echo "--- Audit binary wheel to ensure it's compliant with ${WHEEL_TAG} standard"
tests/ci_build/ci_build.sh auditwheel_x86_64 auditwheel repair \
--plat ${WHEEL_TAG} python-package/dist/*.whl
$command_wrapper python tests/ci_build/rename_whl.py \
Expand Down
6 changes: 3 additions & 3 deletions tests/buildkite/build-cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

WHEEL_TAG=manylinux2014_x86_64
WHEEL_TAG=manylinux_2_28_x86_64

source tests/buildkite/conftest.sh

Expand All @@ -15,7 +15,7 @@ else
arch_flag=""
fi

command_wrapper="tests/ci_build/ci_build.sh gpu_build_centos7 --build-arg "`
command_wrapper="tests/ci_build/ci_build.sh gpu_build_rockylinux8 --build-arg "`
`"CUDA_VERSION_ARG=$CUDA_VERSION --build-arg "`
`"NCCL_VERSION_ARG=$NCCL_VERSION --build-arg "`
`"RAPIDS_VERSION_ARG=$RAPIDS_VERSION"
Expand All @@ -40,7 +40,7 @@ $command_wrapper python tests/ci_build/rename_whl.py \
--commit-hash ${BUILDKITE_COMMIT} \
--platform-tag ${WHEEL_TAG}

echo "--- Audit binary wheel to ensure it's compliant with manylinux2014 standard"
echo "--- Audit binary wheel to ensure it's compliant with ${WHEEL_TAG} standard"
tests/ci_build/ci_build.sh auditwheel_x86_64 auditwheel repair \
--plat ${WHEEL_TAG} python-package/dist/*.whl
$command_wrapper python tests/ci_build/rename_whl.py \
Expand Down
2 changes: 1 addition & 1 deletion tests/buildkite/build-gpu-rpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source tests/buildkite/conftest.sh

echo "--- Build XGBoost R package with CUDA"

tests/ci_build/ci_build.sh gpu_build_r_centos7 \
tests/ci_build/ci_build.sh gpu_build_r_rockylinux8 \
--build-arg CUDA_VERSION_ARG=${CUDA_VERSION} \
--build-arg R_VERSION_ARG=${R_VERSION} \
tests/ci_build/build_r_pkg_with_cuda.sh \
Expand Down
2 changes: 1 addition & 1 deletion tests/buildkite/conftest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CUDA_VERSION=11.8.0
NCCL_VERSION=2.16.5-1
RAPIDS_VERSION=24.04
DEV_RAPIDS_VERSION=24.06
SPARK_VERSION=3.4.0
SPARK_VERSION=3.5.1
JDK_VERSION=8
R_VERSION=4.3.2

Expand Down
2 changes: 1 addition & 1 deletion tests/buildkite/pipeline-mgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
- label: ":docker: Build containers"
commands:
- "tests/buildkite/build-containers.sh gpu"
- "tests/buildkite/build-containers.sh gpu_build_centos7"
- "tests/buildkite/build-containers.sh gpu_build_rockylinux8"
- "tests/buildkite/build-containers.sh jvm_gpu_build"
key: build-containers
agents:
Expand Down
2 changes: 1 addition & 1 deletion tests/buildkite/pipeline-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
#### -------- CONTAINER BUILD --------
- label: ":docker: Build containers"
commands:
- "tests/buildkite/build-containers.sh gpu_build_centos7"
- "tests/buildkite/build-containers.sh gpu_build_rockylinux8"
- "tests/buildkite/build-containers.sh gpu_dev_ver"
key: build-containers
agents:
Expand Down
2 changes: 1 addition & 1 deletion tests/buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
commands:
- "tests/buildkite/build-containers.sh cpu"
- "tests/buildkite/build-containers.sh gpu"
- "tests/buildkite/build-containers.sh gpu_build_centos7"
- "tests/buildkite/build-containers.sh gpu_build_rockylinux8"
key: build-containers
agents:
queue: linux-amd64-cpu
Expand Down
21 changes: 10 additions & 11 deletions tests/ci_build/Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
FROM quay.io/pypa/manylinux2014_aarch64
FROM quay.io/pypa/manylinux_2_28_aarch64

SHELL ["/bin/bash", "-c"] # Use Bash as shell

# Install all basic requirements
RUN \
yum update -y && \
yum install -y tar unzip wget xz git centos-release-scl-rh yum-utils && \
yum-config-manager --enable centos-sclo-rh-testing && \
yum update -y && \
yum install -y devtoolset-9 && \
dnf -y update && \
dnf -y install dnf-plugins-core && \
dnf config-manager --set-enabled powertools && \
dnf install -y tar unzip wget xz git which ninja-build gcc-toolset-10-gcc gcc-toolset-10-binutils gcc-toolset-10-gcc-c++ && \
# Python
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-aarch64.sh && \
bash conda.sh -b -p /opt/mambaforge
bash conda.sh -b -p /opt/miniforge

ENV PATH=/opt/mambaforge/bin:$PATH
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
ENV PATH=/opt/miniforge/bin:$PATH
ENV CC=/opt/rh/gcc-toolset-10/root/usr/bin/gcc
ENV CXX=/opt/rh/gcc-toolset-10/root/usr/bin/c++
ENV CPP=/opt/rh/gcc-toolset-10/root/usr/bin/cpp
ENV GOSU_VERSION 1.10

# Create new Conda environment
Expand Down
2 changes: 1 addition & 1 deletion tests/ci_build/Dockerfile.auditwheel_x86_64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/pypa/manylinux2014_x86_64
FROM quay.io/pypa/manylinux_2_28_x86_64

# Install lightweight sudo (not bound to TTY)
ENV GOSU_VERSION 1.10
Expand Down
12 changes: 6 additions & 6 deletions tests/ci_build/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ RUN \
apt-get install -y software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y tar unzip wget git build-essential doxygen graphviz llvm libidn12 cmake ninja-build gcc-9 g++-9 openjdk-8-jdk-headless && \
apt-get install -y tar unzip wget git build-essential doxygen graphviz llvm libidn12 cmake ninja-build gcc-10 g++-10 openjdk-8-jdk-headless && \
# Python
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-x86_64.sh && \
bash conda.sh -b -p /opt/mambaforge
bash conda.sh -b -p /opt/miniforge

ENV PATH=/opt/mambaforge/bin:$PATH
ENV CC=gcc-9
ENV CXX=g++-9
ENV CPP=cpp-9
ENV PATH=/opt/miniforge/bin:$PATH
ENV CC=gcc-10
ENV CXX=g++-10
ENV CPP=cpp-10

ENV GOSU_VERSION 1.10
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
Expand Down
4 changes: 2 additions & 2 deletions tests/ci_build/Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ RUN \
apt-get install -y wget unzip bzip2 libgomp1 build-essential openjdk-8-jdk-headless && \
# Python
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-x86_64.sh && \
bash conda.sh -b -p /opt/mambaforge
bash conda.sh -b -p /opt/miniforge

ENV PATH=/opt/mambaforge/bin:$PATH
ENV PATH=/opt/miniforge/bin:$PATH

# Create new Conda environment with cuDF, Dask, and cuPy
RUN \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
ARG CUDA_VERSION_ARG
FROM nvcr.io/nvidia/cuda:$CUDA_VERSION_ARG-devel-centos7
FROM nvcr.io/nvidia/cuda:$CUDA_VERSION_ARG-devel-rockylinux8
ARG CUDA_VERSION_ARG
ARG R_VERSION_ARG

# Install all basic requirements
RUN \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/D42D0685.pub | sed '/^Version/d' \
> /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
yum install -y epel-release centos-release-scl && \
yum-config-manager --enable centos-sclo-rh-testing && \
yum -y update && \
yum install -y tar unzip wget xz git which ninja-build readline-devel libX11-devel libXt-devel \
dnf -y update && \
dnf -y install dnf-plugins-core && \
dnf config-manager --set-enabled powertools && \
dnf install -y tar unzip wget xz git which ninja-build readline-devel libX11-devel libXt-devel \
xorg-x11-server-devel openssl-devel zlib-devel bzip2-devel xz-devel \
pcre2-devel libcurl-devel texlive-* \
devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ \
devtoolset-9-gcc-gfortran devtoolset-9-libquadmath-devel \
devtoolset-9-runtime devtoolset-9-libstdc++-devel
gcc-toolset-10-gcc gcc-toolset-10-binutils gcc-toolset-10-gcc-c++ \
gcc-toolset-10-gcc-gfortran gcc-toolset-10-libquadmath-devel \
gcc-toolset-10-runtime gcc-toolset-10-libstdc++-devel

ENV PATH=/opt/mambaforge/bin:/usr/local/ninja:/opt/software/packages/bin:/opt/R/$R_VERSION_ARG/bin:$PATH
ENV PATH=/opt/miniforge/bin:/usr/local/ninja:/opt/software/packages/bin:/opt/R/$R_VERSION_ARG/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/software/packages/lib:/opt/R/$R_VERSION_ARG/lib64:$LD_LIBRARY_PATH
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
ENV F77=/opt/rh/devtoolset-9/root/usr/bin/gfortran
ENV FC=/opt/rh/devtoolset-9/root/usr/bin/gfortran
ENV CC=/opt/rh/gcc-toolset-10/root/usr/bin/gcc
ENV CXX=/opt/rh/gcc-toolset-10/root/usr/bin/c++
ENV CPP=/opt/rh/gcc-toolset-10/root/usr/bin/cpp
ENV F77=/opt/rh/gcc-toolset-10/root/usr/bin/gfortran
ENV FC=/opt/rh/gcc-toolset-10/root/usr/bin/gfortran

RUN \
wget -nv -nc https://cran.r-project.org/src/base/R-4/R-$R_VERSION_ARG.tar.gz && \
Expand All @@ -36,11 +36,11 @@ RUN \
run \
# Python
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-x86_64.sh && \
bash conda.sh -b -p /opt/mambaforge && \
/opt/mambaforge/bin/python -m pip install auditwheel awscli && \
bash conda.sh -b -p /opt/miniforge && \
/opt/miniforge/bin/python -m pip install auditwheel awscli && \
# CMake
wget -nv -nc https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.sh --no-check-certificate && \
bash cmake-3.18.0-Linux-x86_64.sh --skip-license --prefix=/usr
wget -nv -nc https://cmake.org/files/v3.29/cmake-3.29.5-linux-x86_64.sh --no-check-certificate && \
bash cmake-3.29.5-linux-x86_64.sh --skip-license --prefix=/usr

ENV GOSU_VERSION 1.10

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG CUDA_VERSION_ARG
FROM nvcr.io/nvidia/cuda:$CUDA_VERSION_ARG-devel-centos7
FROM nvcr.io/nvidia/cuda:$CUDA_VERSION_ARG-devel-rockylinux8
ARG CUDA_VERSION_ARG
ARG NCCL_VERSION_ARG
ARG RAPIDS_VERSION_ARG
Expand All @@ -8,39 +8,38 @@ ARG RAPIDS_VERSION_ARG
RUN \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/D42D0685.pub | sed '/^Version/d' \
> /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
yum install -y epel-release centos-release-scl && \
yum-config-manager --enable centos-sclo-rh-testing && \
yum -y update && \
yum install -y tar unzip wget xz git which ninja-build devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ && \
dnf -y update && \
dnf -y install dnf-plugins-core && \
dnf config-manager --set-enabled powertools && \
dnf install -y tar unzip wget xz git which ninja-build gcc-toolset-10-gcc gcc-toolset-10-binutils gcc-toolset-10-gcc-c++ && \
# Python
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-x86_64.sh && \
bash conda.sh -b -p /opt/mambaforge && \
/opt/mambaforge/bin/python -m pip install awscli && \
bash conda.sh -b -p /opt/miniforge && \
/opt/miniforge/bin/python -m pip install awscli && \
# CMake
wget -nv -nc https://cmake.org/files/v3.26/cmake-3.26.4-linux-x86_64.sh --no-check-certificate && \
bash cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr
wget -nv -nc https://cmake.org/files/v3.29/cmake-3.29.5-linux-x86_64.sh --no-check-certificate && \
bash cmake-3.29.5-linux-x86_64.sh --skip-license --prefix=/usr

# NCCL2 (License: https://docs.nvidia.com/deeplearning/sdk/nccl-sla/index.html)
RUN \
export CUDA_SHORT=`echo $CUDA_VERSION_ARG | grep -o -E '[0-9]+\.[0-9]'` && \
export NCCL_VERSION=$NCCL_VERSION_ARG && \
wget -nv -nc https://developer.download.nvidia.com/compute/machine-learning/repos/rhel7/x86_64/nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm && \
rpm -i nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm && \
yum -y update && \
yum install -y libnccl-${NCCL_VERSION}+cuda${CUDA_SHORT} libnccl-devel-${NCCL_VERSION}+cuda${CUDA_SHORT} && \
rm -f nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm;
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && \
dnf -y update && \
dnf install -y libnccl-${NCCL_VERSION}+cuda${CUDA_SHORT} libnccl-devel-${NCCL_VERSION}+cuda${CUDA_SHORT}

ENV PATH=/opt/mambaforge/bin:/usr/local/ninja:$PATH
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
ENV CUDAHOSTCXX=/opt/rh/devtoolset-9/root/usr/bin/c++
ENV PATH=/opt/miniforge/bin:/usr/local/ninja:$PATH
ENV CC=/opt/rh/gcc-toolset-10/root/usr/bin/gcc
ENV CXX=/opt/rh/gcc-toolset-10/root/usr/bin/c++
ENV CPP=/opt/rh/gcc-toolset-10/root/usr/bin/cpp
ENV CUDAHOSTCXX=/opt/rh/gcc-toolset-10/root/usr/bin/c++

ENV GOSU_VERSION 1.10

# Install RMM
# Install RMM (Patch out -Werror)
RUN git clone -b v${RAPIDS_VERSION_ARG}.00 https://github.com/rapidsai/rmm.git --recurse-submodules --depth 1 && \
pushd rmm && \
find . -name CMakeLists.txt -print0 | xargs -0 sed -i 's/-Werror//g' && \
mkdir build && \
pushd build && \
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/opt/rmm -DCUDA_STATIC_RUNTIME=ON && \
Expand Down
4 changes: 2 additions & 2 deletions tests/ci_build/Dockerfile.gpu_dev_ver
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ RUN \
apt-get install -y wget unzip bzip2 libgomp1 build-essential openjdk-8-jdk-headless && \
# Python
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-x86_64.sh && \
bash conda.sh -b -p /opt/mambaforge
bash conda.sh -b -p /opt/miniforge

ENV PATH=/opt/mambaforge/bin:$PATH
ENV PATH=/opt/miniforge/bin:$PATH

# Create new Conda environment with dev versions of cuDF, Dask, and cuPy
RUN \
Expand Down
Loading

0 comments on commit bc3747b

Please sign in to comment.