Skip to content

Commit 61df6c8

Browse files
committed
fix(ci): honor APT mirrors in the prebuilt llama-cpp compile step
The builder-prebuilt path installs gcc-14 with apt directly and ignored the APT_MIRROR/APT_PORTS_MIRROR build args the from-source path already honors, so an ubuntu mirror outage broke every arm64 backend build. Pass the args into the stage and run apt-mirror.sh (already in the build context via COPY . /LocalAI) before the apt step. Assisted-by: Claude:claude-fable-5 Signed-off-by: Richard Palethorpe <io@richiejp.com>
1 parent 39cdae3 commit 61df6c8

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.docker/llama-cpp-compile.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ if [ -z "${BUILD_TYPE:-}" ]; then
2828
# variants with it (the host never *selects* SME unless it has it, but every variant must
2929
# still compile).
3030
if [ "${TARGETARCH}" = "arm64" ]; then
31+
# The prebuilt base inherits default ports.ubuntu.com sources; honor the
32+
# APT_*_MIRROR build args here like the from-source path does, so this
33+
# apt step survives a mirror outage.
34+
sh /LocalAI/.docker/apt-mirror.sh || true
3135
apt-get update -qq && apt-get install -y -qq gcc-14 g++-14
3236
export CC=gcc-14 CXX=g++-14
3337
fi

backend/Dockerfile.llama-cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ RUN make -BC /LocalAI/backend/cpp/llama-cpp package
111111
# ============================================================================
112112
FROM ${BUILDER_BASE_IMAGE} AS builder-prebuilt
113113

114+
ARG APT_MIRROR
115+
ENV APT_MIRROR=${APT_MIRROR}
116+
ARG APT_PORTS_MIRROR
117+
ENV APT_PORTS_MIRROR=${APT_PORTS_MIRROR}
114118
ARG BUILD_TYPE
115119
ENV BUILD_TYPE=${BUILD_TYPE}
116120
ARG CUDA_DOCKER_ARCH

0 commit comments

Comments
 (0)