Files
foxhunt/infra/docker/Dockerfile.ci-builder-cpu
jgrusewski 63d8619379 infra(docker): upgrade all images to Ubuntu 24.04 + CUDA 12.9
Align all 4 Docker images with local dev environment:
- ci-builder: CUDA 12.4.1/Ubuntu 22.04 → 12.9.1/Ubuntu 24.04
- ci-builder-cpu: Debian bookworm → Ubuntu 24.04 (+ explicit rustup)
- foxhunt-runtime: Debian bookworm → Ubuntu 24.04
- foxhunt-training-runtime: CUDA 12.6.3 → 12.9.1, nvrtc 12-6 → 12-9

All images now have glibc 2.39, matching the local build machine.
Binaries compiled locally or in CI will run in any of these containers
without GLIBC_2.3x version mismatch errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 09:34:47 +01:00

60 lines
2.5 KiB
Docker

# CUDA-free CI builder image for Foxhunt service compilation
# ~2-3GB vs ~8GB for the CUDA devel variant (Dockerfile.ci-builder)
# Contains: Rust 1.89, protoc, sccache, rclone, git, OpenSSL, clang, mold, lld, make
# Base: Ubuntu 24.04 (glibc 2.39) — matches local dev and training runtime
# Build: docker build -f infra/docker/Dockerfile.ci-builder-cpu -t foxhunt-ci-builder-cpu .
# Push: docker tag foxhunt-ci-builder-cpu gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/ci-builder-cpu:latest
# docker push gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/ci-builder-cpu:latest
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
openssh-client \
curl \
ca-certificates \
pkg-config \
libssl-dev \
lld \
clang \
make \
perl \
build-essential \
libfontconfig1-dev \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install Rust 1.89 stable (no longer inheriting from rust: base image)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.89.0
ENV PATH="/root/.cargo/bin:${PATH}"
# mold linker — 2-5x faster than lld for final link step on large Rust binaries
RUN curl -fsSL https://github.com/rui314/mold/releases/download/v2.35.1/mold-2.35.1-x86_64-linux.tar.gz \
| tar xz -C /usr/local --strip-components=1 \
&& chmod +x /usr/local/bin/mold
# protoc 28.3 (proto3 optional support, matches local dev)
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-x86_64.zip -o /tmp/protoc.zip \
&& unzip -o /tmp/protoc.zip -d /usr/local bin/protoc 'include/*' \
&& rm /tmp/protoc.zip \
&& chmod +x /usr/local/bin/protoc
# sccache for local PVC-backed build caching
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz \
| tar xz -C /usr/local/bin --strip-components=1 sccache-v0.10.0-x86_64-unknown-linux-musl/sccache \
&& chmod +x /usr/local/bin/sccache
# rclone for S3 binary uploads (compile → S3)
RUN curl -fsSL https://downloads.rclone.org/v1.69.1/rclone-v1.69.1-linux-amd64.zip -o /tmp/rclone.zip \
&& unzip -j /tmp/rclone.zip '*/rclone' -d /usr/local/bin/ \
&& rm /tmp/rclone.zip \
&& chmod +x /usr/local/bin/rclone
# clippy pre-installed
RUN rustup component add clippy
# Verify
RUN rustc --version && cargo --version && git --version && protoc --version && sccache --version && make --version && mold --version && rclone --version