From c6f073c4e085e6a33f08d720c1a1058d83987f52 Mon Sep 17 00:00:00 2001 From: stefanwalcz Date: Mon, 20 Jul 2026 13:20:35 +0200 Subject: [PATCH 1/4] chore(rocm): bump ROCm base image 7.2.1 -> 7.14.0-full (native gfx1151 / Strix Halo) ROCm 7.14 adds native gfx1151 (Strix Halo / RDNA 3.5) runtime support. The prebuilt ROCm images pinned rocm/dev-ubuntu-24.04:7.2.1, which predates gfx1151 support, so the published -gpu-rocm-hipblas-* images do not run on that hardware even though gfx1151 is already in AMDGPU_TARGETS. Bump the pin to rocm/dev-ubuntu-24.04:7.14.0-full everywhere it is referenced: - .github/backend-matrix.yml (all hipblas backend build entries) - .github/workflows/base-images.yml (base-grpc-rocm-amd64 gRPC cache is rebuilt on 7.14 so it stays ABI-compatible with the new runtime base) - .github/workflows/image.yml + image-pr.yml (core hipblas image) - .agents/*.md examples + backend/Dockerfile.base-grpc-builder comment Verified on gfx1151 / Strix Halo: a full ROCm 7.14 stack (LocalAI + llama.cpp hipblas, vLLM, embeddings/reranker) runs natively, no HSA_OVERRIDE_GFX_VERSION needed. Other AMD architectures (gfx908/90a/942/1030/1100/1200/1201) build on the same base and are covered by CI; I do not have that hardware to test at runtime. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: stefanwalcz --- .agents/adding-backends.md | 2 +- .agents/building-and-testing.md | 2 +- .agents/ci-caching.md | 2 +- .github/backend-matrix.yml | 60 ++++++++++++++-------------- .github/workflows/base-images.yml | 2 +- .github/workflows/image-pr.yml | 2 +- .github/workflows/image.yml | 2 +- backend/Dockerfile.base-grpc-builder | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.agents/adding-backends.md b/.agents/adding-backends.md index 969684a7d4e3..9c11b1e7ee68 100644 --- a/.agents/adding-backends.md +++ b/.agents/adding-backends.md @@ -92,7 +92,7 @@ If you have a `prepare.sh` doing the clone, delete it — the recipe belongs in - CUDA 13 builds: Add after other CUDA 13 builds (e.g., after `gpu-nvidia-cuda-13-chatterbox`) **Additional build types you may need:** -- ROCm/HIP: Use `build-type: 'hipblas'` with `base-image: "rocm/dev-ubuntu-24.04:7.2.1"` +- ROCm/HIP: Use `build-type: 'hipblas'` with `base-image: "rocm/dev-ubuntu-24.04:7.14.0-full"` - Intel/SYCL: Use `build-type: 'intel'` or `build-type: 'sycl_f16'`/`sycl_f32` with `base-image: "intel/oneapi-basekit:2025.3.2-0-devel-ubuntu24.04"` - L4T (ARM): Use `build-type: 'l4t'` with `platforms: 'linux/arm64'` and `runs-on: 'ubuntu-24.04-arm'` diff --git a/.agents/building-and-testing.md b/.agents/building-and-testing.md index 3cf85c0dc283..6672545a4aad 100644 --- a/.agents/building-and-testing.md +++ b/.agents/building-and-testing.md @@ -11,7 +11,7 @@ Let's say the user wants to build a particular backend for a given platform. For - Use `.github/backend-matrix.yml` as a reference — it's the data-only YAML that lists every backend variant's `build-type`, `base-image`, `platforms`, etc. (`backend.yml` and `backend_pr.yml` consume it via `scripts/changed-backends.js`). - l4t and cublas also require the CUDA major and minor version. - For llama-cpp / ik-llama-cpp / turboquant the matrix also sets `builder-base-image` pointing at a prebuilt `quay.io/go-skynet/ci-cache:base-grpc-*` tag. Local `make backends/` defaults to `BUILDER_TARGET=builder-fromsource` and doesn't need it — the Dockerfile's from-source stage installs everything itself. -- You can pretty print a command like `DOCKER_MAKEFLAGS=-j$(nproc --ignore=1) BUILD_TYPE=hipblas BASE_IMAGE=rocm/dev-ubuntu-24.04:7.2.1 make docker-build-coqui` +- You can pretty print a command like `DOCKER_MAKEFLAGS=-j$(nproc --ignore=1) BUILD_TYPE=hipblas BASE_IMAGE=rocm/dev-ubuntu-24.04:7.14.0-full make docker-build-coqui` - Unless the user specifies that they want you to run the command, then just print it because not all agent frontends handle long running jobs well and the output may overflow your context - The user may say they want to build AMD or ROCM instead of hipblas, or Intel instead of SYCL or NVIDIA insted of l4t or cublas. Ask for confirmation if there is ambiguity. - Sometimes the user may need extra parameters to be added to `docker build` (e.g. `--platform` for cross-platform builds or `--progress` to view the full logs), in which case you can generate the `docker build` command directly. diff --git a/.agents/ci-caching.md b/.agents/ci-caching.md index 17cc6001d908..03799eb29305 100644 --- a/.agents/ci-caching.md +++ b/.agents/ci-caching.md @@ -51,7 +51,7 @@ The C++ backend Dockerfiles (`Dockerfile.{llama-cpp,ik-llama-cpp,turboquant}`) c | `base-grpc-cuda-13-amd64` | the above + CUDA 13.0 toolkit (Ubuntu 22.04 base) | | `base-grpc-cuda-13-arm64` | the above + CUDA 13.0 sbsa toolkit (Ubuntu 24.04 base) | | `base-grpc-l4t-cuda-12-arm64` | JetPack r36.4.0 base (CUDA preinstalled, `SKIP_DRIVERS=true`) + gRPC | -| `base-grpc-rocm-amd64` | rocm/dev-ubuntu-24.04:7.2.1 base + hipblas/hipblaslt/rocblas + gRPC | +| `base-grpc-rocm-amd64` | rocm/dev-ubuntu-24.04:7.14.0-full base + hipblas/hipblaslt/rocblas + gRPC | | `base-grpc-vulkan-amd64` / `base-grpc-vulkan-arm64` | Ubuntu 24.04 + Vulkan SDK 1.4.335 + gRPC | | `base-grpc-intel-amd64` | intel/oneapi-basekit:2025.3.2 base + gRPC | diff --git a/.github/backend-matrix.yml b/.github/backend-matrix.yml index 5d4163f602fc..962cb457eb3e 100644 --- a/.github/backend-matrix.yml +++ b/.github/backend-matrix.yml @@ -2047,7 +2047,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-rerankers' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "rerankers" dockerfile: "./backend/Dockerfile.python" @@ -2061,7 +2061,7 @@ include: tag-suffix: '-gpu-rocm-hipblas-llama-cpp' builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-rocm-amd64' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "llama-cpp" dockerfile: "./backend/Dockerfile.llama-cpp" @@ -2075,7 +2075,7 @@ include: tag-suffix: '-gpu-rocm-hipblas-bonsai' builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-rocm-amd64' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "bonsai" dockerfile: "./backend/Dockerfile.bonsai" @@ -2088,7 +2088,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-vllm' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "vllm" dockerfile: "./backend/Dockerfile.python" @@ -2101,7 +2101,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-vllm-omni' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "vllm-omni" dockerfile: "./backend/Dockerfile.python" @@ -2114,7 +2114,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-sglang' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "sglang" dockerfile: "./backend/Dockerfile.python" @@ -2127,7 +2127,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-transformers' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "transformers" dockerfile: "./backend/Dockerfile.python" @@ -2140,7 +2140,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-diffusers' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "diffusers" dockerfile: "./backend/Dockerfile.python" @@ -2153,7 +2153,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-ace-step' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "ace-step" dockerfile: "./backend/Dockerfile.python" @@ -2167,7 +2167,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-kokoro' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "kokoro" dockerfile: "./backend/Dockerfile.python" @@ -2180,7 +2180,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-vibevoice' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "vibevoice" dockerfile: "./backend/Dockerfile.python" @@ -2193,7 +2193,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-liquid-audio' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "liquid-audio" dockerfile: "./backend/Dockerfile.python" @@ -2206,7 +2206,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-qwen-asr' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "qwen-asr" dockerfile: "./backend/Dockerfile.python" @@ -2219,7 +2219,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-nemo' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "nemo" dockerfile: "./backend/Dockerfile.python" @@ -2232,7 +2232,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-qwen-tts' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "qwen-tts" dockerfile: "./backend/Dockerfile.python" @@ -2245,7 +2245,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-fish-speech' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "fish-speech" dockerfile: "./backend/Dockerfile.python" @@ -2258,7 +2258,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-voxcpm' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "voxcpm" dockerfile: "./backend/Dockerfile.python" @@ -2271,7 +2271,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-pocket-tts' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "pocket-tts" dockerfile: "./backend/Dockerfile.python" @@ -2284,7 +2284,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-faster-whisper' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "faster-whisper" dockerfile: "./backend/Dockerfile.python" @@ -2297,7 +2297,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-coqui' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "coqui" dockerfile: "./backend/Dockerfile.python" @@ -3748,7 +3748,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-whisper' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "whisper" @@ -3761,7 +3761,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-crispasr' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "crispasr" @@ -3870,7 +3870,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-parakeet-cpp' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "parakeet-cpp" @@ -3979,7 +3979,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-moss-transcribe-cpp' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "moss-transcribe-cpp" @@ -4127,7 +4127,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-ced' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "ced" @@ -4275,7 +4275,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-voice-detect' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "voice-detect" @@ -4423,7 +4423,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-face-detect' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "face-detect" @@ -4532,7 +4532,7 @@ include: platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-acestep-cpp' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' skip-drivers: 'false' backend: "acestep-cpp" @@ -5328,7 +5328,7 @@ include: # platforms: 'linux/amd64' # tag-latest: 'auto' # tag-suffix: '-gpu-hipblas-rfdetr' - # base-image: "rocm/dev-ubuntu-24.04:7.2.1" + # base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" # runs-on: 'ubuntu-latest' # skip-drivers: 'false' # backend: "rfdetr" @@ -5400,7 +5400,7 @@ include: tag-latest: 'auto' tag-suffix: '-gpu-rocm-hipblas-neutts' runs-on: 'ubuntu-latest' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" skip-drivers: 'false' backend: "neutts" dockerfile: "./backend/Dockerfile.python" diff --git a/.github/workflows/base-images.yml b/.github/workflows/base-images.yml index 637b603a56fb..87ce9c3fded7 100644 --- a/.github/workflows/base-images.yml +++ b/.github/workflows/base-images.yml @@ -83,7 +83,7 @@ jobs: ubuntu-version: '2404' - tag: 'base-grpc-rocm-amd64' runs-on: 'ubuntu-latest' - base-image: 'rocm/dev-ubuntu-24.04:7.2.1' + base-image: 'rocm/dev-ubuntu-24.04:7.14.0-full' build-type: 'hipblas' cuda-major-version: '' cuda-minor-version: '' diff --git a/.github/workflows/image-pr.yml b/.github/workflows/image-pr.yml index cfc7c47f423b..c6ff8e4c0aa9 100644 --- a/.github/workflows/image-pr.yml +++ b/.github/workflows/image-pr.yml @@ -59,7 +59,7 @@ platforms: 'linux/amd64' tag-latest: 'false' tag-suffix: '-hipblas' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' makeflags: "--jobs=3 --output-sync=target" ubuntu-version: '2404' diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 716faaaee102..4506648acd1f 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -40,7 +40,7 @@ platforms: 'linux/amd64' tag-latest: 'auto' tag-suffix: '-gpu-hipblas' - base-image: "rocm/dev-ubuntu-24.04:7.2.1" + base-image: "rocm/dev-ubuntu-24.04:7.14.0-full" runs-on: 'ubuntu-latest' makeflags: "--jobs=3 --output-sync=target" ubuntu-version: '2404' diff --git a/backend/Dockerfile.base-grpc-builder b/backend/Dockerfile.base-grpc-builder index 8843a0a72c29..c7c681dde82b 100644 --- a/backend/Dockerfile.base-grpc-builder +++ b/backend/Dockerfile.base-grpc-builder @@ -26,7 +26,7 @@ # base-grpc-cuda-13-amd64 ubuntu:22.04 + CUDA 13.0 # base-grpc-cuda-13-arm64 ubuntu:24.04 + CUDA 13.0 (sbsa) # base-grpc-l4t-cuda-12-arm64 ubuntu:22.04 + CUDA 12.x (legacy JetPack) -# base-grpc-rocm-amd64 rocm/dev-ubuntu-24.04:7.2.1 + hipblas +# base-grpc-rocm-amd64 rocm/dev-ubuntu-24.04:7.14.0-full + hipblas # base-grpc-vulkan-amd64 ubuntu:24.04 + Vulkan SDK 1.4.335 # base-grpc-vulkan-arm64 ubuntu:24.04 + Vulkan SDK ARM 1.4.335 # base-grpc-intel-amd64 intel/oneapi-basekit:2025.3.2 (sycl) From 1b874f5144cec1637e90fc672f46690d84b9cf77 Mon Sep 17 00:00:00 2001 From: stefanwalcz Date: Mon, 20 Jul 2026 13:58:32 +0200 Subject: [PATCH 2/4] fix(rocm): ROCm 7.x / TheRock build compat (drop legacy -dev pkgs, register lib paths) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ROCm 7.x moved to 'TheRock' packaging. Bumping the base to rocm/dev-ubuntu-24.04:7.14.0-full surfaces two build breakages, fixed here in ALL THREE spots that installed the legacy ROCm dev metapackages: 1) Legacy hipblas-dev / hipblaslt-dev / rocblas-dev metapackages were removed (consolidated + arch-split: amdrocm-blas-gfx*, amdrocm-blas-dev, ...). 'apt-get install' of the old names fails. The -full base already ships the BLAS dev libs+headers, so the install is dropped in: - Dockerfile (requirements-drivers) -> core image - .docker/install-base-deps.sh (section 6) -> C++ backend builder - backend/Dockerfile.python (hipblas block) -> Python backends (vllm, sglang, transformers, diffusers, kokoro, ...) 2) TheRock scatters the ROCm libs across /opt/rocm/lib, /opt/rocm/lib/rocm_sysdeps/lib and /opt/rocm/llvm/lib with no ld.so.conf.d entry, so the dynamic linker can't resolve them and the built backends fail at RUNTIME ('... cannot open shared object file') — a failure CI never sees because it only surfaces when a backend loads on an AMD GPU. Fixed by registering all three lib dirs in /etc/ld.so.conf.d/rocm.conf before ldconfig in all three blocks. Validated end-to-end on gfx1151 / Strix Halo (build + GPU inference, llama-cpp). Ref: https://rocm.docs.amd.com/en/latest/about/transition-guide-TheRock.html Assisted-by: Claude:claude-opus-4-8 Signed-off-by: stefanwalcz --- .docker/install-base-deps.sh | 22 ++++++++++++---------- Dockerfile | 23 ++++++++++++++--------- backend/Dockerfile.python | 17 ++++++++--------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/.docker/install-base-deps.sh b/.docker/install-base-deps.sh index 2b0e7e0c6a95..f8a5396d20cc 100755 --- a/.docker/install-base-deps.sh +++ b/.docker/install-base-deps.sh @@ -178,16 +178,18 @@ fi # --- 6. ROCm / HIP build deps (BUILD_TYPE=hipblas) --- if [ "${BUILD_TYPE:-}" = "hipblas" ] && [ "${SKIP_DRIVERS:-false}" = "false" ]; then - apt-get update - apt-get install -y --no-install-recommends \ - hipblas-dev \ - hipblaslt-dev \ - rocblas-dev - apt-get clean - rm -rf /var/lib/apt/lists/* - # I have no idea why, but the ROCM lib packages don't trigger ldconfig after they install, - # which results in local-ai and others not being able to locate the libraries. - # We run ldconfig ourselves to work around this packaging deficiency. + # ROCm 7.x ("TheRock" packaging): the legacy hipblas-dev / hipblaslt-dev / + # rocblas-dev metapackages were removed — BLAS is consolidated and split per + # GPU arch (amdrocm-blas-gfx*, amdrocm-blas-dev, amdrocm-blas-host). The + # rocm/dev-ubuntu-*:*-full base image already ships those BLAS dev libs and + # headers, so no apt install is needed here. + # TheRock ships the ROCm libs under /opt/rocm/core*/lib (reached via the + # /opt/rocm/lib alternatives symlink) but registers no ld.so.conf.d entry, so + # the dynamic linker can't resolve them. Without this the ldd-based GPU-lib + # packaging (scripts/build/package-gpu-libs.sh) silently skips librocm_kpack, + # rocBLAS, hipBLASLt, the bundled rocm_sysdeps (zlib/zstd/elf) and the LLVM + # runtime, and the built backend fails to load at runtime. + printf '/opt/rocm/lib\n/opt/rocm/lib/rocm_sysdeps/lib\n/opt/rocm/llvm/lib\n' > /etc/ld.so.conf.d/rocm.conf ldconfig # Log which GPU architectures have rocBLAS kernel support echo "rocBLAS library data architectures:" diff --git a/Dockerfile b/Dockerfile index 7e1e2f4c3ed4..08e12ee65c2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -158,16 +158,21 @@ RUN if [ "${BUILD_TYPE}" = "clblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ ; fi RUN if [ "${BUILD_TYPE}" = "hipblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - hipblas-dev \ - hipblaslt-dev \ - rocblas-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ + # ROCm 7.x ("TheRock" packaging): the legacy hipblas-dev / hipblaslt-dev / + # rocblas-dev metapackages were removed — BLAS is consolidated and split + # per GPU arch (amdrocm-blas-gfx*, amdrocm-blas-dev, amdrocm-blas-host). + # The rocm/dev-ubuntu-*:*-full base image already ships those dev libraries + # and headers, so no apt install is needed here anymore. We still set the + # AMD capability marker. echo "amd" > /run/localai/capability && \ - # I have no idea why, but the ROCM lib packages don't trigger ldconfig after they install, which results in local-ai and others not being able - # to locate the libraries. We run ldconfig ourselves to work around this packaging deficiency + # TheRock ships the ROCm libs under /opt/rocm/core*/lib (reached via the + # /opt/rocm/lib alternatives symlink) but registers no ld.so.conf.d entry, + # so the dynamic linker can't find them. Register the path so ldconfig + # (and the ldd-based backend GPU-lib packaging) resolves librocm_kpack, + # rocBLAS, hipBLASLt, the bundled rocm_sysdeps (zlib/zstd/elf) and the + # LLVM runtime — otherwise the built backend fails at runtime with e.g. + # "librocm_kpack.so.0 / librocm_sysdeps_z.so.1: cannot open shared object". + printf '/opt/rocm/lib\n/opt/rocm/lib/rocm_sysdeps/lib\n/opt/rocm/llvm/lib\n' > /etc/ld.so.conf.d/rocm.conf && \ ldconfig \ ; fi diff --git a/backend/Dockerfile.python b/backend/Dockerfile.python index 2522a6f56be0..b075ed84f47c 100644 --- a/backend/Dockerfile.python +++ b/backend/Dockerfile.python @@ -171,15 +171,14 @@ RUN if [ "${BUILD_TYPE}" = "clblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ ; fi RUN if [ "${BUILD_TYPE}" = "hipblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - hipblas-dev \ - hipblaslt-dev \ - rocblas-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ - # I have no idea why, but the ROCM lib packages don't trigger ldconfig after they install, which results in local-ai and others not being able - # to locate the libraries. We run ldconfig ourselves to work around this packaging deficiency + # ROCm 7.x ("TheRock" packaging): the legacy hipblas-dev / hipblaslt-dev / + # rocblas-dev metapackages were removed (consolidated + arch-split). The + # rocm/dev-ubuntu-*:*-full base image already ships the BLAS dev libs and + # headers, so no apt install is needed. TheRock also scatters the ROCm libs + # across /opt/rocm/lib, /opt/rocm/lib/rocm_sysdeps/lib and /opt/rocm/llvm/lib + # with no ld.so.conf.d entry — register them so ldconfig (and Python + # backends that dlopen ROCm libs at runtime) can resolve them. + printf '/opt/rocm/lib\n/opt/rocm/lib/rocm_sysdeps/lib\n/opt/rocm/llvm/lib\n' > /etc/ld.so.conf.d/rocm.conf && \ ldconfig \ ; fi From 733525f82b63f24fc6b2ee851f7cd65598f2fba6 Mon Sep 17 00:00:00 2001 From: stefanwalcz Date: Mon, 20 Jul 2026 17:31:57 +0200 Subject: [PATCH 3/4] fix(rocm): update Go backend Dockerfile for TheRock packaging Apply the same ROCm 7.14 dependency + linker-path migration to backend/Dockerfile.golang: the removed legacy hipblas-dev / hipblaslt-dev / rocblas-dev metapackages are no longer installed (the rocm/dev-ubuntu-*:*-full base already ships them), and TheRock's scattered ROCm lib dirs are registered in /etc/ld.so.conf.d/rocm.conf before ldconfig so cgo-based Go backends resolve the ROCm runtime libraries at build/link and runtime. Identified by the LocalAI maintenance bot; re-authored under my identity per DCO. Assisted-by: Codex:gpt-5 Signed-off-by: stefanwalcz --- backend/Dockerfile.golang | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/backend/Dockerfile.golang b/backend/Dockerfile.golang index 13032fa2209d..5dc1eada4cd7 100644 --- a/backend/Dockerfile.golang +++ b/backend/Dockerfile.golang @@ -169,15 +169,12 @@ RUN if [ "${BUILD_TYPE}" = "clblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ ; fi RUN if [ "${BUILD_TYPE}" = "hipblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - hipblas-dev \ - hipblaslt-dev \ - rocblas-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ - # I have no idea why, but the ROCM lib packages don't trigger ldconfig after they install, which results in local-ai and others not being able - # to locate the libraries. We run ldconfig ourselves to work around this packaging deficiency + # ROCm 7.x ("TheRock" packaging): the legacy hipblas-dev / hipblaslt-dev / + # rocblas-dev metapackages were removed (consolidated + arch-split). The + # rocm/dev-ubuntu-*:*-full base image already ships the BLAS dev libs and + # headers, so no apt install is needed. Register TheRock's library paths + # so Go backends using cgo can resolve the ROCm runtime libraries. + printf '/opt/rocm/lib\n/opt/rocm/lib/rocm_sysdeps/lib\n/opt/rocm/llvm/lib\n' > /etc/ld.so.conf.d/rocm.conf && \ ldconfig \ ; fi From 4bcd88bbb36547a68bb5663be429db943701bfb3 Mon Sep 17 00:00:00 2001 From: stefanwalcz Date: Thu, 23 Jul 2026 22:24:27 +0200 Subject: [PATCH 4/4] fix(rocm): install amdrocm-blas-dev for from-source hipBLAS CMake backends The -full base ships the ROCm BLAS runtime libraries but not the CMake package-config files (hipblasConfig.cmake / hipblas-config.cmake) that find_package(hipblas) resolves against. Dropping the legacy -dev metapackages is correct for runtime-only paths, but from-source CMake/cgo backends (e.g. qwen3-tts) fail at configure time (find_package(hipblas)) without them. Install TheRock's development component amdrocm-blas-dev in the Go/C++ backend hipblas path so those backends build again, while keeping runtime-only paths dev-free. Fixes the qwen3-tts hipblas configure failure surfaced in CI. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: stefanwalcz --- backend/Dockerfile.golang | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/backend/Dockerfile.golang b/backend/Dockerfile.golang index 5dc1eada4cd7..77f9f07724ad 100644 --- a/backend/Dockerfile.golang +++ b/backend/Dockerfile.golang @@ -170,10 +170,16 @@ RUN if [ "${BUILD_TYPE}" = "clblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ RUN if [ "${BUILD_TYPE}" = "hipblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then \ # ROCm 7.x ("TheRock" packaging): the legacy hipblas-dev / hipblaslt-dev / - # rocblas-dev metapackages were removed (consolidated + arch-split). The - # rocm/dev-ubuntu-*:*-full base image already ships the BLAS dev libs and - # headers, so no apt install is needed. Register TheRock's library paths - # so Go backends using cgo can resolve the ROCm runtime libraries. + # rocblas-dev metapackages were removed (consolidated into amdrocm-blas, + # arch-split). The rocm/dev-ubuntu-*:*-full base ships the BLAS runtime + # libraries, but NOT the CMake package-config files (hipblasConfig.cmake, + # hipblas-config.cmake, ...) that from-source CMake/cgo backends resolve via + # find_package(hipblas) — so install TheRock's development component, or the + # hipblas Go/C++ backends (e.g. qwen3-tts) fail at configure time. + apt-get update && \ + apt-get install -y --no-install-recommends amdrocm-blas-dev && \ + rm -rf /var/lib/apt/lists/* && \ + # Register TheRock's library paths so cgo backends resolve the ROCm libs. printf '/opt/rocm/lib\n/opt/rocm/lib/rocm_sysdeps/lib\n/opt/rocm/llvm/lib\n' > /etc/ld.so.conf.d/rocm.conf && \ ldconfig \ ; fi