Skip to content

Commit 745dcd6

Browse files
authored
feat(ci): build multi-arch Docker image (linux/amd64 + linux/arm64) (#137)
Adds QEMU setup and the `platforms: linux/amd64,linux/arm64` arg to the build-push-action. Apple Silicon Macs and arm64 Linux hosts get a native image (pulled automatically via manifest selection) instead of running under QEMU emulation. amd64 users are unaffected. Tradeoff: arm64 is cross-compiled via QEMU on the x86_64 runner, so release builds are noticeably longer (the torch install + model bake stage both run emulated). Acceptable at current release cadence; can upgrade to a native arm64 runner matrix if it becomes painful.
1 parent 4b98490 commit 745dcd6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ jobs:
126126
steps:
127127
- uses: actions/checkout@v4
128128

129+
# QEMU lets buildx cross-compile linux/arm64 on the x86_64 runner.
130+
- name: Set up QEMU
131+
uses: docker/setup-qemu-action@v3
132+
with:
133+
platforms: arm64
134+
129135
- name: Set up Docker Buildx
130136
uses: docker/setup-buildx-action@v3
131137

@@ -172,6 +178,9 @@ jobs:
172178
context: .
173179
file: docker/Dockerfile
174180
push: true
181+
# Native amd64 for Linux servers + Intel Macs; arm64 (cross-compiled
182+
# via QEMU) for Apple Silicon Macs and arm64 Linux hosts.
183+
platforms: linux/amd64,linux/arm64
175184
# Install cocoindex-code from the checked-out source tree, not PyPI.
176185
# Avoids a race where a just-published version hasn't propagated to
177186
# PyPI's CDN yet (which happened on v0.2.24 release), and ensures

0 commit comments

Comments
 (0)