This repository was archived by the owner on Jul 23, 2025. It is now read-only.
feat: Publish arm64 images as well #33
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This adjusts the publish-dockers workflow to also publish arm64 images. It attempts to build all templates in both amd64 and arm64, but allows the arm64 builds to fail since some of our templates (specifically meta-reference-gpu) fail to build on arm64. After building and pushing the architecture-specific images, it pushes a manifest list for all the architectures we built to the default image location.
Before, we'd end up with images like
distribution-remote-vllmthat contained only the amd64 image. Now,distribution-remote-vllmcontains a manifest list that contains both amd64 and arm64 images. We still publish single manifest, architecture-specific images atdistribution-remote-vllm-amd64anddistribution-remote-vllm-arm64for really old clients, someone that specifically needs an arch-specific image, and because it's the simplest way to run these GitHub workflows as individual steps where we separate arch-specific image building from manifest list publishing in GitHub Actions.This also makes the DockerHub organization name a build parameter that defaults to
llamastackwhich I used when testing this to publish the images to my own repository.The main benefit of this change is it allows arm64 users (whether on linux arm64 or Macs using something like podman desktop) to easily run Llama Stack container images without needing to use emulation.
Test Plan
I ran this workflow on both a pre-release and a release pypi package to verify the workflow runs without error in both cases. It properly pushes and tags amd64 and arm64 images for all default distros exception meta-reference-gpu. That distro only builds under amd64 today, and it gracefully handles the build failure for that distro under arm64 and falls back to just pushing the amd64 image. Note that nowhere are we specifically telling the workflow which images work under amd64 and which under arm64 - it just attempts to build all the templates for both, treating any amd64 build failures as fatal (because all of our bits should work under amd64) and treating and arm64 build failures as non-fatal and continuing on.
Here's a link to the set of images built for
distribution-starteras an example of this working - https://hub.docker.com/r/bbrowning/distribution-starter/tags . I ran this workflow twice - once for a0.2.11rc1release to test the logic that pulls from test pypi, and once for a0.2.11release to test the production release logic.