Skip to content

Fix multi-architecture docker build #130

@bp1183

Description

@bp1183

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

We wish to deploy our lettuce docker images as multi-architecture builds so that both linux/amd64 and linux/arm64 are supported. However, GitHub CI runners do not currently natively support arm64 architectures, so they use the Quick Emulator (QEMU) to emulate their architecture.

It appears as though this emulator does not support all features of the arm processor required by the llama-cpp-python library. Certain low-level CPU features (e.g., DOTPROD, SVE, FP16) or compiler optimizations (e.g., -mcpu=native) may behave differently or fail under emulation, especially for a library like llama-cpp-python that relies heavily on CPU-specific optimizations and native code compilation via CMake.

The docker build on the CI runner is therefore failing at the uv sync step.

Expected Behavior

The build should proceed successfully and the image build check and development image publishing should be successful for multi-architecture builds.

Steps To Reproduce

  1. Add the QEMU emulation action on the check.container-build.yml workflow (this actionsis commented out in the release.dev-base.yml workflow.)
  2. In the build docker image action add the linux/arm64 to the platforms key alongside amd/64.
  3. Run the workflow (can trigger manually on GitHub).

Environment

- OS:
- Other environment details:

I'm part of a Project Team

No response

Anything else?

No response

Are you willing to contribute to resolve this issue?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions