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 diff --git a/containers/dockerfile/Dockerfile.i386 b/containers/dockerfile/Dockerfile.i386 index 5dc77f6..5ecae14 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 + 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-i386" && \ + 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"]