Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

LunarG doesn't provide arm64 Vulkan SDK packages. This PR adds arm64 support using pre-built binaries from mudler/vulkan-sdk-arm.

Changes

Dockerfiles (Dockerfile, backend/Dockerfile.{golang,llama-cpp,python}):

  • Split Vulkan SDK installation into architecture-specific blocks
  • amd64: LunarG SDK 1.4.328.1 (unchanged)
  • arm64: Pre-built SDK 1.4.335.0 from mudler/vulkan-sdk-arm, installed to /usr/lib/aarch64-linux-gnu/
if [ "amd64" = "$TARGETARCH" ]; then
    # LunarG SDK with build script
    wget "https://sdk.lunarg.com/sdk/download/1.4.328.1/linux/vulkansdk-linux-x86_64-1.4.328.1.tar.xz"
    # ... build and install
fi
if [ "arm64" = "$TARGETARCH" ]; then
    # Pre-built arm64 SDK
    curl -L -o vulkan-sdk.tar.xz https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.335.0/vulkansdk-ubuntu-24.04-arm-1.4.335.0.tar.xz
    # ... extract and install to aarch64 paths
fi

GitHub Actions (.github/workflows/{image,image-pr,backend}.yml):

  • Updated platforms from linux/amd64 to linux/amd64,linux/arm64 for:
    • Core Vulkan image builds
    • Backend builds: llama-cpp, stablediffusion-ggml, whisper
Original prompt

Objective

Enable Vulkan arm64 image builds for LocalAI. This PR addresses issue #5778 and is a continuation/replacement of PR #5780.

Background

The current Vulkan SDK installation only supports amd64 architecture because LunarG doesn't provide arm64 packages. The mudler/vulkan-sdk-arm repository now provides pre-built Vulkan SDK images for arm64.

Changes Required

1. Update Dockerfile files to support arm64 Vulkan builds

The following Dockerfiles need to be modified to add arm64 support for Vulkan SDK installation:

  • Dockerfile (root)
  • backend/Dockerfile.golang
  • backend/Dockerfile.llama-cpp
  • backend/Dockerfile.python

For each file, the Vulkan requirements section needs to be updated to:

  • Keep the existing LunarG SDK download and build approach for amd64
  • Add arm64 support by downloading and installing the pre-built SDK from https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.335.0/vulkansdk-ubuntu-24.04-arm-1.4.335.0.tar.xz

The arm64 installation should:

if [ "arm64" = "$TARGETARCH" ]; then
    mkdir vulkan && cd vulkan && \
    curl -L -o vulkan-sdk.tar.xz https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.335.0/vulkansdk-ubuntu-24.04-arm-1.4.335.0.tar.xz && \
    tar -xvf vulkan-sdk.tar.xz && \
    rm vulkan-sdk.tar.xz && \
    cd 1.4.335.0 && \
    cp -rfv aarch64/bin/* /usr/bin/ && \
    cp -rfv aarch64/lib/* /usr/lib/aarch64-linux-gnu/ && \
    cp -rfv aarch64/include/* /usr/include/ && \
    cp -rfv aarch64/share/* /usr/share/ && \
    cd ../.. && \
    rm -rf vulkan && \
    ldconfig
fi

2. Update GitHub Actions workflow files

Update the following workflow files to add linux/arm64 platform support for Vulkan builds:

.github/workflows/image.yml:

  • Change the vulkan build matrix entry's platforms from 'linux/amd64' to 'linux/amd64,linux/arm64'

.github/workflows/image-pr.yml:

  • Change the vulkan build matrix entry's platforms from 'linux/amd64' to 'linux/amd64,linux/arm64'

.github/workflows/backend.yml:

  • For Vulkan backend builds (llama-cpp, stablediffusion-ggml, whisper with build-type 'vulkan'), change platforms from 'linux/amd64' to 'linux/amd64,linux/arm64'

Important Notes

  • The base image is ubuntu:24.04, so use the vulkansdk-ubuntu-24.04-arm-1.4.335.0.tar.xz variant
  • The arm64 libraries should be installed to /usr/lib/aarch64-linux-gnu/ (matching the arm64 library path)
  • Make sure to run ldconfig after installing libraries
  • The amd64 path should remain using LunarG's vulkansdk-linux-x86_64-1.4.328.1.tar.xz with the ./vulkansdk build script approach

References

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 6875e25
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/695e8938eb87c50008d3b5ec
😎 Deploy Preview https://deploy-preview-7912--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Vulkan arm64 image builds for LocalAI Enable Vulkan arm64 image builds Jan 7, 2026
Copilot AI requested a review from mudler January 7, 2026 16:30
@mudler mudler marked this pull request as ready for review January 7, 2026 20:49
@mudler mudler changed the title Enable Vulkan arm64 image builds feat: enable Vulkan arm64 image builds Jan 7, 2026
@mudler mudler merged commit b2ff1ce into master Jan 7, 2026
31 of 36 checks passed
@mudler mudler deleted the copilot/enable-vulkan-arm64-support branch January 7, 2026 20:49
@mudler mudler added the enhancement New feature or request label Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build vulkan image for arm64

2 participants