Skip to content

ci: add linux/arm64 to buildx matrix for Dockerfile.vulkan #116

Description

@itigges22

Why

#115 added arm64 code paths (arch detection, AMD-on-aarch64 -> vulkan fallback, doctor check_arch) but CI still only runs on ubuntu-latest which is x86_64. Means any future regression in the arm64 code path (a stray if arch == 'x86_64' somewhere, an apt package that doesn't exist on arm64, a python wheel without arm64 build) won't be caught until someone with arm64 hardware reports it.

The Dockerfiles that work on arm64 today:

  • Dockerfile.vulkan — ubuntu + mesa, fully multi-arch ready
  • Dockerfile.v31 — needs the sbsa/l4t base image swap, harder to test in CI without paying for arm64 runners
  • Dockerfile.rocm — permanently x86_64 only (no AMD arm64 release)

so the right scope is: add linux/arm64 to the buildx matrix for Dockerfile.vulkan only, leaving the others alone.

Scope

  • Add platforms: linux/amd64,linux/arm64 to the build-push-action call for the llama service in .github/workflows/build-images.yml IF a separate Dockerfile.vulkan job exists (currently it doesn't... build-images.yml only builds Dockerfile.v31)
  • Probably easier: add a new matrix entry for the vulkan image so it gets published as a separate atlas-llama-vulkan:dev / :latest tag, then make THAT one multi-arch
  • Use QEMU emulation on the free GH runners (slow but free) OR opt into ARM64-native GH runners (ubuntu-24.04-arm, fast but paid)
  • Update docs/SETUP.md#arm64 to point at the prebuilt arm64 image once it's published

Tradeoffs

  • QEMU build time for arm64 llama image is going to be painful... probably 60-90min vs 30min for native amd64. The cmake compile is the bottleneck and QEMU adds 3-5x overhead on it.
  • arm64 native runners would be ~10min but they're not free.
  • A reasonable compromise: only build arm64 on tag pushes (releases), not on every dev push. Dev iteration stays fast, releases get the full matrix.

Dependencies

Activity

  1. itigges22 commented on May 23, 2026

    @itigges22
    CollaboratorAuthor

    shipped in b6fb04d (initial wire-up) + 60c4a75, 0e2e302, 33e4fca (ubuntu 24.04 deps drift fixups).

    what's wired:

    • new llama-vulkan entry in the build-images.yml matrix, builds Dockerfile.vulkan and publishes to ghcr.io/itigges22/atlas-llama-vulkan.
    • conditional platforms: linux/amd64 on dev/main pushes (fast iteration), linux/amd64,linux/arm64 on tag pushes (release matrix).
    • QEMU setup step that only fires for the arm64 build, gated on startsWith(github.ref, 'refs/tags/v')... amd64-only dev pushes don't pay the QEMU registration cost.
    • registry-based cache (same pattern as the CUDA llama since GHA cache caps at 10GB total and the vulkan image is several GB).
    • free-disk-space action now triggers for both llama and llama-vulkan jobs (vulkan image is similarly large during build).

    what the fixups untangled (in order):

    • 60c4a75: ubuntu 22.04 default vulkan-headers (1.3.204) was too old for current llama.cpp which uses VkPhysicalDevicePipelineRobustnessFeaturesEXT + friends from Vulkan 1.3.246+. Bumped UBUNTU_TAG to 24.04.
    • 0e2e302: glslc moved out of glslang-tools into its own package on ubuntu 24.04. Added glslc.
    • 33e4fca: SPIR-V namespace ('spv' has not been declared) needed spirv-headers + spirv-tools as separate packages on 24.04.

    each round took ~5min of CI to surface the next issue... overall lesson: docker buildx build --check validates Dockerfile syntax but not the actual package availability or compiler header versions. The first real-cold publish IS the only complete test for distro deps drift.

    validated end-to-end in CI run 26318234746 (all 6 services green including the new llama-vulkan).

    on the next tag push (vX.Y.Z) the arm64 image will publish for the first time... mac users on Apple Silicon, Snapdragon X Elite folks, Pi 5 users, arm64 Linux workstation users can pull ghcr.io/itigges22/atlas-llama-vulkan:X.Y.Z directly instead of building locally.

    closing was auto from the commit trailer in b6fb04d, just adding the actual green-build confirmation here for the record.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions