Skip to content

Commit 3301af9

Browse files
authored
Build ARM CUDA container, part 2 (#56)
1 parent b2b46d9 commit 3301af9

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

.github/workflows/containers.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ jobs:
6363
runner: linux-arm64-cpu
6464
- image_repo: xgb-ci.gpu_build_cuda13_rockylinux8_aarch64
6565
runner: linux-arm64-cpu
66+
- image_repo: xgb-ci.gpu_build_rockylinux8_aarch64
67+
runner: linux-arm64-cpu
6668
steps:
6769
- name: Workflow trigger information
6870
run: |

containers/ci_container.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ xgb-ci.gpu_build_rockylinux8:
1616
CUDA_VERSION: *cuda_version
1717
NCCL_VERSION: *nccl_version
1818
RAPIDS_VERSION: *rapids_version
19+
ARCH: x86_64
20+
21+
xgb-ci.gpu_build_rockylinux8_aarch64:
22+
container_def: gpu_build_rockylinux8
23+
build_args:
24+
CUDA_VERSION: *cuda_version
25+
NCCL_VERSION: *nccl_version
26+
RAPIDS_VERSION: *rapids_version
27+
ARCH: aarch64
1928

2029
xgb-ci.gpu_build_cuda13_rockylinux8:
2130
container_def: gpu_build_cuda13_rockylinux8

containers/dockerfile/Dockerfile.gpu_build_rockylinux8

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM nvcr.io/nvidia/cuda:$CUDA_VERSION-devel-rockylinux8
33
ARG CUDA_VERSION
44
ARG NCCL_VERSION
55
ARG RAPIDS_VERSION
6+
ARG ARCH=x86_64
67
ARG MINIFORGE_VERSION=24.9.2-0
78
ARG CMAKE_VERSION=3.31.2
89

@@ -17,24 +18,26 @@ ENV GOSU_VERSION=1.10
1718

1819
# Install all basic requirements
1920
RUN \
20-
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/D42D0685.pub | sed '/^Version/d' \
21+
{ [ $ARCH = "aarch64" ] && export CUDA_REPO_ARCH="sbsa" || export CUDA_REPO_ARCH="x86_64"; } && \
22+
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel8/${CUDA_REPO_ARCH}/D42D0685.pub | sed '/^Version/d' \
2123
> /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
2224
dnf -y update && \
2325
dnf -y install dnf-plugins-core && \
2426
dnf config-manager --set-enabled powertools && \
2527
dnf install -y tar unzip wget xz git which ninja-build gcc-toolset-10-gcc gcc-toolset-10-binutils gcc-toolset-10-gcc-c++ && \
2628
# Miniforge
27-
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/$MINIFORGE_VERSION/Miniforge3-$MINIFORGE_VERSION-Linux-x86_64.sh && \
29+
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/$MINIFORGE_VERSION/Miniforge3-$MINIFORGE_VERSION-Linux-${ARCH}.sh && \
2830
bash conda.sh -b -p /opt/miniforge && \
2931
/opt/miniforge/bin/python -m pip install awscli && \
3032
# CMake
31-
wget -nv -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh && \
33+
wget -nv -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${ARCH}.sh && \
3234
bash cmake.sh --skip-license --prefix=/usr
3335

3436
# NCCL2 (License: https://docs.nvidia.com/deeplearning/sdk/nccl-sla/index.html)
3537
RUN \
38+
{ [ $ARCH = "aarch64" ] && export CUDA_REPO_ARCH="sbsa" || export CUDA_REPO_ARCH="x86_64"; } && \
3639
export NCCL_VERSION=$NCCL_VERSION && \
37-
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo && \
40+
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/${CUDA_REPO_ARCH}/cuda-rhel8.repo && \
3841
dnf -y update && \
3942
dnf install -y libnccl-${NCCL_VERSION}+cuda12.9 libnccl-devel-${NCCL_VERSION}+cuda12.9
4043

@@ -72,7 +75,8 @@ RUN git clone -b branch-${RAPIDS_VERSION} https://github.com/rapidsai/rmm.git --
7275

7376
# Install lightweight sudo (not bound to TTY)
7477
RUN set -ex; \
75-
wget -nv -nc -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \
78+
{ [ $ARCH = "aarch64" ] && export GOSU_ARCH="arm64" || export GOSU_ARCH="amd64"; } && \
79+
wget -nv -nc -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-${GOSU_ARCH}" && \
7680
chmod +x /usr/local/bin/gosu && \
7781
gosu nobody true
7882

0 commit comments

Comments
 (0)