From d732bfb9167cf58271f9110846405b3cb6e2c233 Mon Sep 17 00:00:00 2001 From: Elron Bandel Date: Sun, 28 Jun 2026 15:30:16 +0300 Subject: [PATCH] perf(combos): move gettext-base+curl to benchmark bases; drop per-combo standalone apt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The -standalone build ran apt-get install gettext-base curl on top of each per-combo eval-base — uncacheable (per-combo base) and emulated under QEMU on the arm64 leg. That single RUN was the combo-build bottleneck (~37min/shard; the lean combo itself is pure COPY). Moving the deps into the 6 benchmark bases (built once, natively, cached) makes the standalone layer pure COPY. ROLLOUT: the first release after this MUST set rebuild_bases=true so the bases carry gettext-base before the no-apt standalones build (else standalone lacks envsubst). Later releases reuse the frozen bases. Signed-off-by: Elron Bandel --- containers/core/benchmark-base-duckdb/Dockerfile | 2 +- containers/core/benchmark-base-external/Dockerfile | 2 +- containers/core/benchmark-base-github/Dockerfile | 2 +- containers/core/benchmark-base-hf/Dockerfile | 2 +- containers/core/benchmark-base-python-slim/Dockerfile | 2 +- containers/core/benchmark-base-slim/Dockerfile | 2 +- containers/core/standalone.Dockerfile | 9 +++------ 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/containers/core/benchmark-base-duckdb/Dockerfile b/containers/core/benchmark-base-duckdb/Dockerfile index da1f2a02..dfb439af 100644 --- a/containers/core/benchmark-base-duckdb/Dockerfile +++ b/containers/core/benchmark-base-duckdb/Dockerfile @@ -13,7 +13,7 @@ ARG DUCKDB_VERSION=1.5.3 RUN set -e; ok=0; \ for i in 1 2 3 4 5; do \ if apt-get update --fix-missing && apt-get install -y --no-install-recommends \ - curl ca-certificates unzip jq; then ok=1; break; fi; \ + curl ca-certificates unzip jq gettext-base; then ok=1; break; fi; \ echo "apt attempt $i failed; retry" >&2; sleep $((i*5)); \ done; \ [ "$ok" = 1 ] || { echo "apt install failed after 5 tries" >&2; exit 1; }; \ diff --git a/containers/core/benchmark-base-external/Dockerfile b/containers/core/benchmark-base-external/Dockerfile index edfe0fad..17c688ee 100644 --- a/containers/core/benchmark-base-external/Dockerfile +++ b/containers/core/benchmark-base-external/Dockerfile @@ -20,7 +20,7 @@ RUN set -e; ok=0; \ if apt-get update --fix-missing \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends \ - curl ca-certificates git jq; then ok=1; break; fi; \ + curl ca-certificates git jq gettext-base; then ok=1; break; fi; \ echo "apt attempt $i failed; retry" >&2; sleep $((i*5)); \ done; \ [ "$ok" = 1 ] || { echo "apt install failed after 5 tries" >&2; exit 1; }; \ diff --git a/containers/core/benchmark-base-github/Dockerfile b/containers/core/benchmark-base-github/Dockerfile index 82a8252d..2aa81c94 100644 --- a/containers/core/benchmark-base-github/Dockerfile +++ b/containers/core/benchmark-base-github/Dockerfile @@ -14,7 +14,7 @@ RUN set -e; ok=0; \ if apt-get update --fix-missing \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends \ - curl ca-certificates git jq; then ok=1; break; fi; \ + curl ca-certificates git jq gettext-base; then ok=1; break; fi; \ echo "apt attempt $i failed; retry" >&2; sleep $((i*5)); \ done; \ [ "$ok" = 1 ] || { echo "apt install failed after 5 tries" >&2; exit 1; }; \ diff --git a/containers/core/benchmark-base-hf/Dockerfile b/containers/core/benchmark-base-hf/Dockerfile index b81fe7f7..e2b0b4d7 100644 --- a/containers/core/benchmark-base-hf/Dockerfile +++ b/containers/core/benchmark-base-hf/Dockerfile @@ -23,7 +23,7 @@ RUN set -e; ok=0; \ if apt-get update --fix-missing \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends \ - curl ca-certificates git jq; then ok=1; break; fi; \ + curl ca-certificates git jq gettext-base; then ok=1; break; fi; \ echo "apt attempt $i failed; retry" >&2; sleep $((i*5)); \ done; \ [ "$ok" = 1 ] || { echo "apt install failed after 5 tries" >&2; exit 1; }; \ diff --git a/containers/core/benchmark-base-python-slim/Dockerfile b/containers/core/benchmark-base-python-slim/Dockerfile index 6124780b..1487a722 100644 --- a/containers/core/benchmark-base-python-slim/Dockerfile +++ b/containers/core/benchmark-base-python-slim/Dockerfile @@ -15,7 +15,7 @@ LABEL eval.base.kind="python-slim" RUN set -e; ok=0; \ for i in 1 2 3 4 5; do \ if apt-get update --fix-missing && apt-get install -y --no-install-recommends \ - jq ca-certificates; then ok=1; break; fi; \ + jq ca-certificates curl gettext-base; then ok=1; break; fi; \ echo "apt attempt $i failed; retry" >&2; sleep $((i*5)); \ done; \ [ "$ok" = 1 ] || { echo "apt install failed after 5 tries" >&2; exit 1; }; \ diff --git a/containers/core/benchmark-base-slim/Dockerfile b/containers/core/benchmark-base-slim/Dockerfile index a53e4be1..f580ea54 100644 --- a/containers/core/benchmark-base-slim/Dockerfile +++ b/containers/core/benchmark-base-slim/Dockerfile @@ -13,7 +13,7 @@ LABEL eval.base.kind="slim" RUN set -e; ok=0; \ for i in 1 2 3 4 5; do \ if apt-get update --fix-missing && apt-get install -y --no-install-recommends \ - jq ca-certificates; then ok=1; break; fi; \ + jq ca-certificates curl gettext-base; then ok=1; break; fi; \ echo "apt attempt $i failed; retry" >&2; sleep $((i*5)); \ done; \ [ "$ok" = 1 ] || { echo "apt install failed after 5 tries" >&2; exit 1; }; \ diff --git a/containers/core/standalone.Dockerfile b/containers/core/standalone.Dockerfile index 27593681..b07c657f 100644 --- a/containers/core/standalone.Dockerfile +++ b/containers/core/standalone.Dockerfile @@ -54,12 +54,9 @@ FROM eval-base # ─── Gateway layer (uniform /opt/gateway/ contract) ────────────────── COPY --from=model /opt/gateway /opt/gateway -# The gateway's start script uses envsubst to render its config template at -# runtime. envsubst is part of `gettext-base` on Debian; the combination's base -# is the benchmark image (Debian-slim), which doesn't have it. Install it here -# (single-container mode is the only place the gateway runs in-process). -RUN apt-get update && apt-get install -y --no-install-recommends gettext-base curl \ - && rm -rf /var/lib/apt/lists/* +# The gateway's start script needs envsubst (gettext-base) + curl at runtime; +# both now ship in the benchmark base, so this layer stays pure COPY — no +# per-combo apt (that emulated install under QEMU was the combo-build bottleneck). # ─── OTel collector layer ──────────────────────────────────────────── COPY --from=otel /otelcol /usr/local/bin/otelcol