Skip to content

feat(ci): build multi-arch Docker image (linux/amd64 + linux/arm64)#137

Merged
georgeh0 merged 1 commit intomainfrom
g/docker-multiarch
Apr 14, 2026
Merged

feat(ci): build multi-arch Docker image (linux/amd64 + linux/arm64)#137
georgeh0 merged 1 commit intomainfrom
g/docker-multiarch

Conversation

@georgeh0
Copy link
Copy Markdown
Member

Follow-up to #135 and #136.

Summary

  • Add QEMU setup and platforms: linux/amd64,linux/arm64 to the publish-docker job. Apple Silicon Macs and arm64 Linux hosts (e.g. AWS Graviton) now get a native image through manifest selection, instead of running the amd64 image under Docker Desktop's emulation — which is especially slow for this image because of torch + sentence-transformers at runtime.
  • amd64 pulls are unchanged.

Tradeoff

arm64 is cross-compiled via QEMU on the x86_64 runner, so release builds take noticeably longer (the torch install in stage 1 and the model bake in stage 2 both run emulated). Acceptable for our release cadence; if it becomes painful we can split into an amd64/arm64 matrix using GitHub's native ubuntu-24.04-arm runner + docker/metadata-action manifest merge.

Test plan

  • Trigger the workflow manually (workflow_dispatch with test_docker=true) after this lands to verify both platforms build successfully. The :test tag gets a multi-arch manifest; docker buildx imagetools inspect cocoindex/cocoindex-code:test should show both platforms.

🤖 Generated with Claude Code

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.
@georgeh0 georgeh0 merged commit 745dcd6 into main Apr 14, 2026
4 checks passed
@georgeh0 georgeh0 deleted the g/docker-multiarch branch April 14, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant