diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index fb57c93..1242064 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -32,13 +32,13 @@ jobs: fail-fast: false matrix: image_repo: - - xgb-ci.clang_tidy - xgb-ci.cpu - xgb-ci.cpu_build_r_doc - xgb-ci.gpu + - xgb-ci.gpu_cuda12 - xgb-ci.gpu_build_r_rockylinux8 - xgb-ci.gpu_build_rockylinux8 - - xgb-ci.gpu_build_cuda13_rockylinux8 + - xgb-ci.gpu_build_cuda12_rockylinux8 - xgb-ci.jvm - xgb-ci.jvm_gpu_build - xgb-ci.manylinux_2_28_x86_64 @@ -50,14 +50,16 @@ jobs: runner: linux-arm64-cpu - image_repo: xgb-ci.manylinux_2_28_aarch64 runner: linux-arm64-cpu - - image_repo: xgb-ci.gpu_build_cuda13_rockylinux8_aarch64 - runner: linux-arm64-cpu - image_repo: xgb-ci.gpu_build_rockylinux8_aarch64 runner: linux-arm64-cpu + - image_repo: xgb-ci.gpu_build_cuda12_rockylinux8_aarch64 + runner: linux-arm64-cpu - image_repo: xgb-ci.cpu_aarch64 runner: linux-arm64-cpu - image_repo: xgb-ci.gpu_aarch64 runner: linux-arm64-cpu + - image_repo: xgb-ci.gpu_cuda12_aarch64 + runner: linux-arm64-cpu steps: # Restart Docker daemon so that it recognizes the ephemeral disks - run: sudo systemctl restart docker diff --git a/containers/ci_container.yml b/containers/ci_container.yml index 0039303..74663bd 100644 --- a/containers/ci_container.yml +++ b/containers/ci_container.yml @@ -7,8 +7,9 @@ x-rapids_versions: stable: &rapids_version "26.04" x-cuda_versions: - cuda: &cuda_version "12.9.0" - nccl: &nccl_version "2.29.2-1" + default: &cuda_version "13.3.0" + cuda12: &cuda12_version "12.9.0" + nccl: &nccl_version "2.30.7-1" xgb-ci.gpu_build_rockylinux8: container_def: gpu_build_rockylinux8 @@ -26,17 +27,18 @@ xgb-ci.gpu_build_rockylinux8_aarch64: RAPIDS_VERSION: *rapids_version ARCH: aarch64 -xgb-ci.gpu_build_cuda13_rockylinux8: - container_def: gpu_build_cuda13_rockylinux8 +# CUDA 12 builders are used for the xgboost-cu12 PyPI package and clang CI jobs. +xgb-ci.gpu_build_cuda12_rockylinux8: + container_def: gpu_build_cuda12_rockylinux8 build_args: - CUDA_VERSION: "13.0.0" + CUDA_VERSION: *cuda12_version NCCL_VERSION: *nccl_version ARCH: x86_64 -xgb-ci.gpu_build_cuda13_rockylinux8_aarch64: - container_def: gpu_build_cuda13_rockylinux8 +xgb-ci.gpu_build_cuda12_rockylinux8_aarch64: + container_def: gpu_build_cuda12_rockylinux8 build_args: - CUDA_VERSION: "13.0.0" + CUDA_VERSION: *cuda12_version NCCL_VERSION: *nccl_version ARCH: aarch64 @@ -65,10 +67,22 @@ xgb-ci.gpu_aarch64: RAPIDS_VERSION: *rapids_version ARCH: aarch64 -xgb-ci.clang_tidy: - container_def: clang_tidy +# CUDA 12 runtime images provide native test environments for xgboost-cu12. +xgb-ci.gpu_cuda12: + container_def: gpu build_args: - CUDA_VERSION: *cuda_version + CUDA_VERSION: *cuda12_version + NCCL_VERSION: *nccl_version + RAPIDS_VERSION: *rapids_version + ARCH: x86_64 + +xgb-ci.gpu_cuda12_aarch64: + container_def: gpu + build_args: + CUDA_VERSION: *cuda12_version + NCCL_VERSION: *nccl_version + RAPIDS_VERSION: *rapids_version + ARCH: aarch64 xgb-ci.cpu: container_def: cpu diff --git a/containers/conda_env/linux_cpu_test.yml b/containers/conda_env/linux_cpu_test.yml index 26db088..348eb3a 100644 --- a/containers/conda_env/linux_cpu_test.yml +++ b/containers/conda_env/linux_cpu_test.yml @@ -27,19 +27,21 @@ dependencies: - pytest - pytest-timeout - pytest-cov -- python-kubernetes - urllib3 - jsonschema - loky>=3.5.1 - pyarrow -- protobuf -- cloudpickle -- modin +- polars # PySpark +- cloudpickle - pyspark>=4.0 - grpcio - grpcio-status - googleapis-common-protos - zstandard +# The modin on conda forge is old at the time of writing (0.32.0). Old modin constraints +# the numpy version to <2. Pulling it from PyPI is not safe with its large dependency +# tree. Just disable it on the CPU CI for now. +# - modin - pip: - py-ubjson diff --git a/containers/dockerfile/Dockerfile.clang_tidy b/containers/dockerfile/Dockerfile.clang_tidy deleted file mode 100644 index c353bf7..0000000 --- a/containers/dockerfile/Dockerfile.clang_tidy +++ /dev/null @@ -1,41 +0,0 @@ -ARG CUDA_VERSION=notset -FROM nvidia/cuda:$CUDA_VERSION-devel-ubuntu22.04 -ARG CUDA_VERSION - -ENV DEBIAN_FRONTEND=noninteractive -ENV GOSU_VERSION=1.10 - -COPY scripts/install_gosu.sh /scripts/ - -RUN \ - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub && \ - apt-get update && \ - apt-get install -y wget git python3 python3-pip software-properties-common \ - apt-transport-https ca-certificates gnupg-agent && \ - apt-get install -y ninja-build libgtest-dev libgmock-dev - -# Install clang-tidy: https://apt.llvm.org/ -RUN \ - apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" && \ - wget -O llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key && \ - apt-key add ./llvm-snapshot.gpg.key && \ - rm llvm-snapshot.gpg.key && \ - apt-get update && \ - apt-get install -y clang-tidy-19 clang-19 libomp-19-dev - -# Set default clang-tidy version -RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-19 100 && \ - update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100 - -# Install Python packages -RUN pip3 install cmake - -# Install lightweight sudo (not bound to TTY) -RUN sh /scripts/install_gosu.sh - -# Default entry-point to use if running locally -# It will preserve attributes of created files -COPY entrypoint.sh /scripts/ - -WORKDIR /workspace -ENTRYPOINT ["/scripts/entrypoint.sh"] diff --git a/containers/dockerfile/Dockerfile.cpu b/containers/dockerfile/Dockerfile.cpu index 626828b..7a6da46 100644 --- a/containers/dockerfile/Dockerfile.cpu +++ b/containers/dockerfile/Dockerfile.cpu @@ -1,6 +1,6 @@ FROM ubuntu:22.04 ARG ARCH=x86_64 -ARG MINIFORGE_VERSION=24.9.2-0 +ARG MINIFORGE_VERSION=26.3.2-3 SHELL ["/bin/bash", "-c"] @@ -26,20 +26,6 @@ RUN \ wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/$MINIFORGE_VERSION/Miniforge3-$MINIFORGE_VERSION-Linux-${ARCH}.sh && \ bash conda.sh -b -p /opt/miniforge -# Install gRPC -# Patch Abseil to apply https://github.com/abseil/abseil-cpp/issues/1629 -RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ - --recurse-submodules --depth 1 && \ - pushd grpc && \ - pushd third_party/abseil-cpp && \ - git fetch origin master && \ - git cherry-pick -n cfde5f74e276049727f9556f13473a59fe77d9eb && \ - popd && \ - cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ - cmake --build build --target install && \ - popd && \ - rm -rf grpc - RUN mamba install awscli -y # install awscli into base # Create new Conda environment diff --git a/containers/dockerfile/Dockerfile.gpu b/containers/dockerfile/Dockerfile.gpu index 75fb92a..deed401 100644 --- a/containers/dockerfile/Dockerfile.gpu +++ b/containers/dockerfile/Dockerfile.gpu @@ -5,7 +5,7 @@ ARG RAPIDS_VERSION # Should be first 4 digits (e.g. 24.06) ARG NCCL_VERSION ARG ARCH=x86_64 -ARG MINIFORGE_VERSION=24.9.2-0 +ARG MINIFORGE_VERSION=26.3.2-3 ARG PYTHON_VERSION=3.12 SHELL ["/bin/bash", "-c"] diff --git a/containers/dockerfile/Dockerfile.gpu_build_cuda13_rockylinux8 b/containers/dockerfile/Dockerfile.gpu_build_cuda12_rockylinux8 similarity index 92% rename from containers/dockerfile/Dockerfile.gpu_build_cuda13_rockylinux8 rename to containers/dockerfile/Dockerfile.gpu_build_cuda12_rockylinux8 index 055ded3..8e185bd 100644 --- a/containers/dockerfile/Dockerfile.gpu_build_cuda13_rockylinux8 +++ b/containers/dockerfile/Dockerfile.gpu_build_cuda12_rockylinux8 @@ -3,7 +3,7 @@ FROM nvcr.io/nvidia/cuda:$CUDA_VERSION-devel-rockylinux8 ARG CUDA_VERSION ARG NCCL_VERSION ARG ARCH=x86_64 -ARG MINIFORGE_VERSION=25.11.0-1 +ARG MINIFORGE_VERSION=26.3.2-3 ARG CMAKE_VERSION=4.1.0 SHELL ["/bin/bash", "-c"] @@ -36,7 +36,7 @@ RUN \ export NCCL_VERSION=$NCCL_VERSION && \ dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/${CUDA_REPO_ARCH}/cuda-rhel8.repo && \ dnf -y update && \ - dnf install -y libnccl-${NCCL_VERSION}+cuda13.1 libnccl-devel-${NCCL_VERSION}+cuda13.1 libnccl-static-${NCCL_VERSION}+cuda13.1 + dnf install -y libnccl-${NCCL_VERSION}+cuda${CUDA_SHORT} libnccl-devel-${NCCL_VERSION}+cuda${CUDA_SHORT} # Install lightweight sudo (not bound to TTY) RUN sh /scripts/install_gosu.sh diff --git a/containers/dockerfile/Dockerfile.gpu_build_r_rockylinux8 b/containers/dockerfile/Dockerfile.gpu_build_r_rockylinux8 index 58cdc79..4b0dcd5 100644 --- a/containers/dockerfile/Dockerfile.gpu_build_r_rockylinux8 +++ b/containers/dockerfile/Dockerfile.gpu_build_r_rockylinux8 @@ -2,8 +2,8 @@ ARG CUDA_VERSION=notset FROM nvcr.io/nvidia/cuda:$CUDA_VERSION-devel-rockylinux8 ARG CUDA_VERSION ARG R_VERSION -ARG MINIFORGE_VERSION=24.9.2-0 -ARG CMAKE_VERSION=3.31.2 +ARG MINIFORGE_VERSION=26.3.2-3 +ARG CMAKE_VERSION=4.1.0 SHELL ["/bin/bash", "-c"] diff --git a/containers/dockerfile/Dockerfile.gpu_build_rockylinux8 b/containers/dockerfile/Dockerfile.gpu_build_rockylinux8 index bb5f17c..3a29bd8 100644 --- a/containers/dockerfile/Dockerfile.gpu_build_rockylinux8 +++ b/containers/dockerfile/Dockerfile.gpu_build_rockylinux8 @@ -4,8 +4,8 @@ ARG CUDA_VERSION ARG NCCL_VERSION ARG RAPIDS_VERSION ARG ARCH=x86_64 -ARG MINIFORGE_VERSION=24.9.2-0 -ARG CMAKE_VERSION=3.31.2 +ARG MINIFORGE_VERSION=26.3.2-3 +ARG CMAKE_VERSION=4.1.0 SHELL ["/bin/bash", "-c"] @@ -39,29 +39,19 @@ RUN \ dnf -y update && \ dnf install -y libnccl-${NCCL_VERSION}+cuda${CUDA_SHORT} libnccl-devel-${NCCL_VERSION}+cuda${CUDA_SHORT} -# Install gRPC -# Patch Abseil to apply https://github.com/abseil/abseil-cpp/issues/1629 -RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ - --recurse-submodules --depth 1 && \ - pushd grpc && \ - pushd third_party/abseil-cpp && \ - git fetch origin master && \ - git cherry-pick -n cfde5f74e276049727f9556f13473a59fe77d9eb && \ - popd && \ - cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ - cmake --build build --target install && \ - popd && \ - rm -rf grpc - # Install RMM # Patch out -Werror +# Force the static logger dependencies to use the container's GCC toolchain instead of +# reusing ABI-incompatible shared libraries from Miniforge. RUN git clone -b v${RAPIDS_VERSION}.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' && \ pushd cpp && \ mkdir build && \ pushd build && \ - cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/opt/rmm -DCUDA_STATIC_RUNTIME=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF && \ + cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/opt/rmm -DCUDA_STATIC_RUNTIME=ON \ + -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF \ + -DCPM_DOWNLOAD_fmt=ON -DCPM_DOWNLOAD_spdlog=ON && \ cmake --build . --target install && \ popd && popd && popd && \ rm -rf rmm diff --git a/containers/dockerfile/Dockerfile.jvm b/containers/dockerfile/Dockerfile.jvm index 85392e5..3e5e7be 100644 --- a/containers/dockerfile/Dockerfile.jvm +++ b/containers/dockerfile/Dockerfile.jvm @@ -1,6 +1,6 @@ FROM rockylinux:8 -ARG MINIFORGE_VERSION=24.9.2-0 -ARG CMAKE_VERSION=3.31.2 +ARG MINIFORGE_VERSION=26.3.2-3 +ARG CMAKE_VERSION=4.1.0 ARG MAVEN_VERSION=3.9.16 SHELL ["/bin/bash", "-c"] diff --git a/containers/dockerfile/Dockerfile.jvm_gpu_build b/containers/dockerfile/Dockerfile.jvm_gpu_build index b6ff0e5..d57cf94 100644 --- a/containers/dockerfile/Dockerfile.jvm_gpu_build +++ b/containers/dockerfile/Dockerfile.jvm_gpu_build @@ -2,8 +2,8 @@ ARG CUDA_VERSION=notset FROM nvcr.io/nvidia/cuda:$CUDA_VERSION-devel-rockylinux8 ARG CUDA_VERSION ARG NCCL_VERSION -ARG MINIFORGE_VERSION=24.9.2-0 -ARG CMAKE_VERSION=3.31.2 +ARG MINIFORGE_VERSION=26.3.2-3 +ARG CMAKE_VERSION=4.1.0 ARG MAVEN_VERSION=3.9.16 SHELL ["/bin/bash", "-c"] diff --git a/containers/dockerfile/Dockerfile.manylinux_2_28_aarch64 b/containers/dockerfile/Dockerfile.manylinux_2_28_aarch64 index 0a490fb..d9fa794 100644 --- a/containers/dockerfile/Dockerfile.manylinux_2_28_aarch64 +++ b/containers/dockerfile/Dockerfile.manylinux_2_28_aarch64 @@ -1,5 +1,5 @@ FROM quay.io/pypa/manylinux_2_28_aarch64 -ARG MINIFORGE_VERSION=24.9.2-0 +ARG MINIFORGE_VERSION=26.3.2-3 SHELL ["/bin/bash", "-c"] diff --git a/containers/extract_build_args.sh b/containers/extract_build_args.sh index 2d4985a..d1e9d28 100755 --- a/containers/extract_build_args.sh +++ b/containers/extract_build_args.sh @@ -3,9 +3,9 @@ ## given the image repo. ## ## Example input: -## xgb-ci.clang_tidy +## xgb-ci.cpu ## Example output: -## CONTAINER_DEF='clang_tidy' BUILD_ARGS='--build-arg CUDA_VERSION_ARG=12.4.1' +## CONTAINER_DEF='cpu' BUILD_ARGS='--build-arg ARCH=x86_64' if [ "$#" -ne 1 ]; then echo "Usage: $0 [image_repo]"