mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-30 18:09:05 -04:00
* fix(ci): build the CUDA 13 image on Ubuntu 24.04 The amd64 `-gpu-nvidia-cuda-13` image is the only runtime image still built FROM ubuntu:22.04. The Ubuntu 24.04 migration (#7769) bumped its `ubuntu-version` to 2404 but left `base-image` on jammy, so the image ships glibc 2.35 while adding the noble CUDA apt repository, and every backend it unpacks is built on noble. Backends therefore cannot dlopen the libraries they bundle. The vLLM backend dies at import time with: OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /backends/cuda13-vllm/lib/libnuma.so.1) and torchcodec finds no usable libavutil because jammy ships ffmpeg 4.x (libavutil.so.56) while torchcodec looks for .so.57 through .so.60. Add a spec over the build matrices that fails when a base image and the `ubuntu-version`/`ubuntu-codename` it is paired with disagree, or when the runtime images are split across Ubuntu releases. Entries whose base image does not name a release (JetPack) are left alone. The `base-grpc-cuda-13-amd64` builder base stays on jammy: it only compiles backends, and a lower glibc floor in a builder is safe. Fixes #11059 Assisted-by: Claude:claude-opus-5 golangci-lint Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ci): drop the build matrix invariant spec Per review, the CI matrix guard does not belong in the tree. Only the base image bump remains. Assisted-by: Claude:claude-opus-5 [Claude Code] Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
315 lines
12 KiB
YAML
315 lines
12 KiB
YAML
---
|
|
name: 'build container images'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- '*'
|
|
|
|
concurrency:
|
|
group: ci-${{ github.event.pull_request.number || github.sha }}-${{ github.repository }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
hipblas-jobs:
|
|
if: github.repository == 'mudler/LocalAI'
|
|
uses: ./.github/workflows/image_build.yml
|
|
with:
|
|
tag-latest: ${{ matrix.tag-latest }}
|
|
tag-suffix: ${{ matrix.tag-suffix }}
|
|
build-type: ${{ matrix.build-type }}
|
|
cuda-major-version: ${{ matrix.cuda-major-version }}
|
|
cuda-minor-version: ${{ matrix.cuda-minor-version }}
|
|
platforms: ${{ matrix.platforms }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
base-image: ${{ matrix.base-image }}
|
|
makeflags: ${{ matrix.makeflags }}
|
|
ubuntu-version: ${{ matrix.ubuntu-version }}
|
|
ubuntu-codename: ${{ matrix.ubuntu-codename }}
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- build-type: 'hipblas'
|
|
platforms: 'linux/amd64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-hipblas'
|
|
base-image: "rocm/dev-ubuntu-24.04:7.2.1"
|
|
runs-on: 'ubuntu-latest'
|
|
makeflags: "--jobs=3 --output-sync=target"
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
|
|
core-image-build:
|
|
if: github.repository == 'mudler/LocalAI'
|
|
uses: ./.github/workflows/image_build.yml
|
|
with:
|
|
tag-latest: ${{ matrix.tag-latest }}
|
|
tag-suffix: ${{ matrix.tag-suffix }}
|
|
build-type: ${{ matrix.build-type }}
|
|
cuda-major-version: ${{ matrix.cuda-major-version }}
|
|
cuda-minor-version: ${{ matrix.cuda-minor-version }}
|
|
platforms: ${{ matrix.platforms }}
|
|
platform-tag: ${{ matrix.platform-tag || '' }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
base-image: ${{ matrix.base-image }}
|
|
makeflags: ${{ matrix.makeflags }}
|
|
skip-drivers: ${{ matrix.skip-drivers }}
|
|
ubuntu-version: ${{ matrix.ubuntu-version }}
|
|
ubuntu-codename: ${{ matrix.ubuntu-codename }}
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
strategy:
|
|
#max-parallel: ${{ github.event_name != 'pull_request' && 2 || 4 }}
|
|
matrix:
|
|
include:
|
|
- build-type: ''
|
|
platforms: 'linux/amd64'
|
|
platform-tag: 'amd64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: ''
|
|
base-image: "ubuntu:24.04"
|
|
runs-on: 'ubuntu-latest'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
skip-drivers: 'false'
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
- build-type: ''
|
|
platforms: 'linux/arm64'
|
|
platform-tag: 'arm64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: ''
|
|
base-image: "ubuntu:24.04"
|
|
runs-on: 'ubuntu-24.04-arm'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
skip-drivers: 'false'
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
- build-type: 'cublas'
|
|
cuda-major-version: "12"
|
|
cuda-minor-version: "8"
|
|
platforms: 'linux/amd64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-nvidia-cuda-12'
|
|
runs-on: 'ubuntu-latest'
|
|
base-image: "ubuntu:24.04"
|
|
skip-drivers: 'false'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
- build-type: 'cublas'
|
|
cuda-major-version: "13"
|
|
cuda-minor-version: "0"
|
|
platforms: 'linux/amd64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-nvidia-cuda-13'
|
|
runs-on: 'ubuntu-latest'
|
|
base-image: "ubuntu:24.04"
|
|
skip-drivers: 'false'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
- build-type: 'vulkan'
|
|
platforms: 'linux/amd64'
|
|
platform-tag: 'amd64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-vulkan'
|
|
runs-on: 'ubuntu-latest'
|
|
base-image: "ubuntu:24.04"
|
|
skip-drivers: 'false'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
- build-type: 'vulkan'
|
|
platforms: 'linux/arm64'
|
|
platform-tag: 'arm64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-vulkan'
|
|
runs-on: 'ubuntu-24.04-arm'
|
|
base-image: "ubuntu:24.04"
|
|
skip-drivers: 'false'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
- build-type: 'intel'
|
|
platforms: 'linux/amd64'
|
|
tag-latest: 'auto'
|
|
base-image: "intel/oneapi-basekit:2025.3.2-0-devel-ubuntu24.04"
|
|
tag-suffix: '-gpu-intel'
|
|
runs-on: 'ubuntu-latest'
|
|
makeflags: "--jobs=3 --output-sync=target"
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
|
|
core-image-merge:
|
|
# !cancelled(): without it, GHA's default `needs:` cascade skips the
|
|
# merge whenever any matrix cell of the parent build fails or is
|
|
# cancelled. Same fix as backend.yml's merge jobs — we still want to
|
|
# publish the manifest list for tag-suffixes whose legs all succeeded.
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: core-image-build
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: ''
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
gpu-vulkan-image-merge:
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: core-image-build
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-vulkan'
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
# Single-arch server-image merges. Same conceptual fix as the backend
|
|
# singletons in PR #9781: image_build.yml pushes by canonical digest
|
|
# only, so without a downstream merge step there's no tag for consumers
|
|
# (no :latest-gpu-nvidia-cuda-12, no :v<X>-gpu-nvidia-cuda-12, etc.).
|
|
# Each merge job needs only its parent build matrix and is filtered by
|
|
# tag-suffix in image_merge.yml's artifact-download pattern.
|
|
gpu-nvidia-cuda-12-image-merge:
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: core-image-build
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-nvidia-cuda-12'
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
gpu-nvidia-cuda-13-image-merge:
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: core-image-build
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-nvidia-cuda-13'
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
gpu-intel-image-merge:
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: core-image-build
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-intel'
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
gpu-hipblas-image-merge:
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: hipblas-jobs
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-gpu-hipblas'
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
nvidia-l4t-arm64-image-merge:
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: gh-runner
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-nvidia-l4t-arm64'
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
nvidia-l4t-arm64-cuda-13-image-merge:
|
|
if: ${{ !cancelled() && github.repository == 'mudler/LocalAI' }}
|
|
needs: gh-runner
|
|
uses: ./.github/workflows/image_merge.yml
|
|
with:
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-nvidia-l4t-arm64-cuda-13'
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
gh-runner:
|
|
if: github.repository == 'mudler/LocalAI'
|
|
uses: ./.github/workflows/image_build.yml
|
|
with:
|
|
tag-latest: ${{ matrix.tag-latest }}
|
|
tag-suffix: ${{ matrix.tag-suffix }}
|
|
build-type: ${{ matrix.build-type }}
|
|
cuda-major-version: ${{ matrix.cuda-major-version }}
|
|
cuda-minor-version: ${{ matrix.cuda-minor-version }}
|
|
platforms: ${{ matrix.platforms }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
base-image: ${{ matrix.base-image }}
|
|
makeflags: ${{ matrix.makeflags }}
|
|
skip-drivers: ${{ matrix.skip-drivers }}
|
|
ubuntu-version: ${{ matrix.ubuntu-version }}
|
|
ubuntu-codename: ${{ matrix.ubuntu-codename }}
|
|
secrets:
|
|
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- build-type: 'cublas'
|
|
cuda-major-version: "12"
|
|
cuda-minor-version: "0"
|
|
platforms: 'linux/arm64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-nvidia-l4t-arm64'
|
|
base-image: "nvcr.io/nvidia/l4t-jetpack:r36.4.0"
|
|
runs-on: 'ubuntu-24.04-arm'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
skip-drivers: 'true'
|
|
ubuntu-version: "2204"
|
|
ubuntu-codename: 'jammy'
|
|
- build-type: 'cublas'
|
|
cuda-major-version: "13"
|
|
cuda-minor-version: "0"
|
|
platforms: 'linux/arm64'
|
|
tag-latest: 'auto'
|
|
tag-suffix: '-nvidia-l4t-arm64-cuda-13'
|
|
base-image: "ubuntu:24.04"
|
|
runs-on: 'ubuntu-24.04-arm'
|
|
makeflags: "--jobs=4 --output-sync=target"
|
|
skip-drivers: 'false'
|
|
ubuntu-version: '2404'
|
|
ubuntu-codename: 'noble'
|
|
|