Skip to content

CI: Fix docker multiarch overwrite#21144

Closed
Ts-sound wants to merge 14 commits intoggml-org:masterfrom
Ts-sound:fix/ci-docker-multiarch-overwrite
Closed

CI: Fix docker multiarch overwrite#21144
Ts-sound wants to merge 14 commits intoggml-org:masterfrom
Ts-sound:fix/ci-docker-multiarch-overwrite

Conversation

@Ts-sound
Copy link
Copy Markdown
Contributor

Overview

Fix Docker multi-arch build issue where linux/amd64 and linux/arm64 images were being overwritten.

Changes:

  • linux/amd64,linux/arm64 together in a single build step
  • Add warning comments

Additional Information

Related Issues:

Verified Build: https://github.com/Ts-sound/llama.cpp/actions/runs/23698614431

Test Log

Verified both architectures can be pulled correctly:

docker pull --platform linux/amd64 ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa
server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa: Pulling from ts-sound/llama.cpp
817807f3c64e: Pull complete 
77934b4dbf31: Pull complete 
99f02020ab7e: Pull complete 
7c40fe929531: Pull complete 
4f4fb700ef54: Pull complete 
Digest: sha256:89094a943857df696567f9fb6663fd020c58f604f29c2450317747ae772c01d0
Status: Downloaded newer image for ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa
ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa

@Ts-sound ➜ /workspaces/llama.cpp (fix/ci-docker-multiarch-overwrite) $ docker inspect ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa | grep "Architecture"
        "Architecture": "amd64",

@Ts-sound ➜ /workspaces/llama.cpp (fix/ci-docker-multiarch-overwrite) $ docker pull --platform linux/arm64 ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa
server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa: Pulling from ts-sound/llama.cpp
86790fc5660d: Already exists 
b8217b9162ff: Pull complete 
4601ae44735c: Pull complete 
b13ac46fbd92: Pull complete 
4f4fb700ef54: Pull complete 
Digest: sha256:89094a943857df696567f9fb6663fd020c58f604f29c2450317747ae772c01d0
Status: Downloaded newer image for ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa
ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES
    • AI assisted in summarizing test notes and generating PR description

@Ts-sound Ts-sound requested a review from a team as a code owner March 29, 2026 07:09
@github-actions github-actions Bot added the devops improvements to build systems and github actions label Mar 29, 2026
@Ts-sound
Copy link
Copy Markdown
Contributor Author

@taronaeo

@CISC
Copy link
Copy Markdown
Member

CISC commented Mar 29, 2026

Ah, yes, forgot about this, please test that the resulting entry works correctly for both.

Also, please bump the runner on the create_tag job, try using ubuntu-slim first.

@Ts-sound
Copy link
Copy Markdown
Contributor Author

Testing docker images run - amd64/arm64

amd64

02c2cfbd8118 : --platform linux/amd64 ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa

docker run -it --rm 02c2cfbd8118 
load_backend: loaded CPU backend from /app/libggml-cpu-haswell.so
main: n_parallel is set to auto, using n_parallel = 4 and kv_unified = true
build: 8588 (4e634fa62) with GNU 14.2.0 for Linux x86_64
system info: n_threads = 1, n_threads_batch = 1, total_threads = 2

system_info: n_threads = 1 (n_threads_batch = 1) / 2 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 | 
...

arm64

docker run --privileged --rm tonistiigi/binfmt --install all
installing: ppc64le OK
installing: riscv64 OK
installing: mips64 OK
installing: loong64 OK
installing: arm64 OK
installing: arm OK
installing: s390x OK
installing: mips64le OK
...

@Ts-sound ➜ /workspaces/llama.cpp (master) $ docker run -it --rm  --platform linux/arm64 ghcr.io/ts-sound/llama.cpp:server-fix-ci-docker-multiarch-overwrite-b8588-4e634fa
load_backend: loaded CPU backend from /app/libggml-cpu-armv9.2_2.so
main: n_parallel is set to auto, using n_parallel = 4 and kv_unified = true
build: 8588 (4e634fa62) with GNU 14.2.0 for Linux aarch64
system info: n_threads = 1, n_threads_batch = 1, total_threads = 2

system_info: n_threads = 1 (n_threads_batch = 1) / 2 | CPU : NEON = 1 | ARM_FMA = 1 | FP16_VA = 1 | MATMUL_INT8 = 1 | SVE = 1 | DOTPROD = 1 | SVE_CNT = 64 | SME = 1 | OPENMP = 1 | REPACK = 1 | 
...

@taronaeo taronaeo linked an issue Mar 29, 2026 that may be closed by this pull request
@ehfd
Copy link
Copy Markdown
Contributor

ehfd commented Mar 29, 2026

I have a full solution in #21122, which goes completely beyond the fix here and resolves various further issues. The build will be 4-5 times faster (no ARM64 emulation bottleneck) with my PR than the solution here.

I have added @Ts-sound as a co-author.

@ehfd
Copy link
Copy Markdown
Contributor

ehfd commented Mar 31, 2026

Superseded by #21122.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: Docker image

4 participants