From 0395cc19b71938d74421da698ff91864f3970cd6 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 9 Dec 2024 16:27:27 -0800 Subject: [PATCH 1/3] Build i386 container --- .github/workflows/containers.yml | 3 +++ containers/ci_container.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 2523471..cf08fd3 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -14,9 +14,11 @@ on: - main paths: - 'containers/**' + - '.github/workflows/containers.yml' pull_request: paths: - 'containers/**' + - '.github/workflows/containers.yml' schedule: - cron: "0 7 * * 1" # Run once weekly @@ -51,6 +53,7 @@ jobs: - xgb-ci.jvm_gpu_build - xgb-ci.manylinux_2_28_x86_64 - xgb-ci.manylinux2014_x86_64 + - xgb-ci.i386 runner: [linux-amd64-cpu] include: - container_id: xgb-ci.aarch64 diff --git a/containers/ci_container.yml b/containers/ci_container.yml index a0deba2..63aa875 100644 --- a/containers/ci_container.yml +++ b/containers/ci_container.yml @@ -70,3 +70,6 @@ xgb-ci.jvm_gpu_build: build_args: CUDA_VERSION: "12.4.1" NCCL_VERSION: "2.23.4-1" + +xgb-ci.i386: + container_def: i386 From 370ef562048929a0a299dfb69a7e9628acd8e146 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 9 Dec 2024 16:52:05 -0800 Subject: [PATCH 2/3] Fix permissions --- containers/dockerfile/Dockerfile.i386 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/containers/dockerfile/Dockerfile.i386 b/containers/dockerfile/Dockerfile.i386 index 5dc77f6..3d83ac3 100644 --- a/containers/dockerfile/Dockerfile.i386 +++ b/containers/dockerfile/Dockerfile.i386 @@ -3,6 +3,20 @@ FROM i386/debian:sid SHELL ["/bin/bash", "-c"] ENV DEBIAN_FRONTEND=noninteractive +ENV GOSU_VERSION=1.10 RUN apt-get update && \ apt-get install -y tar unzip wget git build-essential ninja-build cmake + +# Install lightweight sudo (not bound to TTY) +RUN set -ex; \ + curl -o /usr/local/bin/gosu -L "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \ + chmod +x /usr/local/bin/gosu && \ + gosu nobody true + +# 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"] From 03d82022381b104a9415cdd0de4e127fe589db95 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 9 Dec 2024 16:57:41 -0800 Subject: [PATCH 3/3] Install curl --- containers/dockerfile/Dockerfile.i386 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/dockerfile/Dockerfile.i386 b/containers/dockerfile/Dockerfile.i386 index 3d83ac3..5ecae14 100644 --- a/containers/dockerfile/Dockerfile.i386 +++ b/containers/dockerfile/Dockerfile.i386 @@ -6,11 +6,11 @@ ENV DEBIAN_FRONTEND=noninteractive ENV GOSU_VERSION=1.10 RUN apt-get update && \ - apt-get install -y tar unzip wget git build-essential ninja-build cmake + apt-get install -y tar unzip wget git build-essential ninja-build cmake curl # Install lightweight sudo (not bound to TTY) RUN set -ex; \ - curl -o /usr/local/bin/gosu -L "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \ + curl -o /usr/local/bin/gosu -L "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-i386" && \ chmod +x /usr/local/bin/gosu && \ gosu nobody true