chore(image): drop rclone from ci-builder-cpu Dockerfile

rclone (~50 MB installed) is not used by any Argo step that runs in
ci-builder-cpu. The only Argo step that does use rclone
(build-web-dashboard) runs in node:22-alpine and apk-installs rclone
itself. Removing here saves an unused ~50 MB layer in every
ci-builder-cpu pull on every CI compile pod cold-start.

Tools deliberately KEPT despite the original task suggestion to remove
them:
  - terragrunt + tofu — used by terragrunt-apply step in
    ci-pipeline-template.yaml (runs in ci-builder-cpu)
  - kubectl          — used by apply-argo-templates step in
    ci-pipeline-template.yaml (runs in ci-builder-cpu)

Removing those would break those pipeline steps.

Expected impact: ~50 MB image size reduction, ~3-7 sec cold-pull
savings per compile pod. Smaller than the original ~250 MB estimate
because terragrunt/tofu/kubectl had to stay.

Validation: visually inspected Dockerfile syntax (no docker daemon
available locally). Grepped infra/k8s/argo/*.yaml for rclone usage —
only build-web-dashboard (node:22-alpine) references it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-05-02 10:08:56 +02:00
parent 107293977b
commit b008b32d73

View File

@@ -1,10 +1,15 @@
# 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, OpenTofu, Terragrunt, kubectl, git, OpenSSL, clang, mold, lld, make
# Contains: Rust 1.89, protoc, sccache, OpenTofu, Terragrunt, kubectl, git, OpenSSL, clang, mold, lld, make,
# CUDA nvcc/cudart-dev/cublas-dev (for cudarc .cubin precompilation in ml-* crate builds)
# 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
# Note: rclone is NOT installed here — the only Argo step that uses it
# (build-web-dashboard) runs in node:22-alpine and `apk add`s rclone itself.
# terragrunt/tofu/kubectl ARE kept because terragrunt-apply and
# apply-argo-templates in ci-pipeline-template.yaml run in this image.
FROM ubuntu:24.04
@@ -46,12 +51,6 @@ RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/scca
| 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
@@ -81,4 +80,4 @@ RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu24
ENV PATH="/usr/local/cuda-12.6/bin:${PATH}"
# Verify
RUN rustc --version && cargo --version && git --version && protoc --version && sccache --version && make --version && mold --version && rclone --version && tofu --version && terragrunt --version && kubectl version --client && nvcc --version
RUN rustc --version && cargo --version && git --version && protoc --version && sccache --version && make --version && mold --version && tofu --version && terragrunt --version && kubectl version --client && nvcc --version