From d1a9d59917922928dbe5d919fbcb6ea7844e35b2 Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Thu, 25 Jun 2026 22:07:56 +0200 Subject: [PATCH] feat(backends): darwin/Metal builds for vision C++/ggml backends (depth-anything, locate-anything, rfdetr-cpp, sam3-cpp) (#10511) feat(backends): darwin/Metal builds for the vision C++/ggml backends depth-anything-cpp, locate-anything-cpp, rfdetr-cpp and sam3-cpp already carry a Darwin/Metal path in their Makefiles (GGML_METAL=ON when build-type=metal), but were never wired into CI, so no Metal image was published and Apple Silicon could not install them. - .github/backend-matrix.yml: add the four to includeDarwin (build-type metal, lang go), matching the other go+ggml *-cpp Metal entries. - backend/index.yaml: add metal: to each backend's capabilities map (main and -development) plus concrete metal-(-development) entries pointing at the latest/master -metal-darwin-arm64- images. - backend/go/*/Makefile: a one-line note on the existing Darwin branch (also the per-backend change the CI path filter needs to actually build them here). Assisted-by: Claude:opus-4.8 [Claude Code] Signed-off-by: Ettore Di Giacinto Co-authored-by: Ettore Di Giacinto --- .github/backend-matrix.yml | 19 ++++++++++ backend/go/depth-anything-cpp/Makefile | 2 ++ backend/go/locate-anything-cpp/Makefile | 2 ++ backend/go/rfdetr-cpp/Makefile | 2 ++ backend/go/sam3-cpp/Makefile | 2 ++ backend/index.yaml | 48 +++++++++++++++++++++++++ 6 files changed, 75 insertions(+) diff --git a/.github/backend-matrix.yml b/.github/backend-matrix.yml index 5ad6d9e16..dc12daf97 100644 --- a/.github/backend-matrix.yml +++ b/.github/backend-matrix.yml @@ -4922,6 +4922,25 @@ includeDarwin: tag-suffix: "-metal-darwin-arm64-vibevoice-cpp" build-type: "metal" lang: "go" + # Vision/utility C++/ggml backends (go+cgo). Their Makefiles already carry a + # Darwin/Metal path (GGML_METAL=ON when build-type=metal); this just builds and + # publishes the metal image so Apple Silicon can install them. + - backend: "depth-anything-cpp" + tag-suffix: "-metal-darwin-arm64-depth-anything-cpp" + build-type: "metal" + lang: "go" + - backend: "locate-anything-cpp" + tag-suffix: "-metal-darwin-arm64-locate-anything-cpp" + build-type: "metal" + lang: "go" + - backend: "rfdetr-cpp" + tag-suffix: "-metal-darwin-arm64-rfdetr-cpp" + build-type: "metal" + lang: "go" + - backend: "sam3-cpp" + tag-suffix: "-metal-darwin-arm64-sam3-cpp" + build-type: "metal" + lang: "go" - backend: "voxtral" tag-suffix: "-metal-darwin-arm64-voxtral" build-type: "metal" diff --git a/backend/go/depth-anything-cpp/Makefile b/backend/go/depth-anything-cpp/Makefile index efe99a626..e142607ab 100644 --- a/backend/go/depth-anything-cpp/Makefile +++ b/backend/go/depth-anything-cpp/Makefile @@ -40,6 +40,8 @@ else ifeq ($(BUILD_TYPE),hipblas) else ifeq ($(BUILD_TYPE),vulkan) CMAKE_ARGS+=-DGGML_VULKAN=ON -DDA_GGML_VULKAN=ON else ifeq ($(OS),Darwin) + # macOS/Metal: built + published as an OCI image by CI (includeDarwin in + # .github/backend-matrix.yml) so Apple Silicon users can install this backend. ifneq ($(BUILD_TYPE),metal) CMAKE_ARGS+=-DGGML_METAL=OFF else diff --git a/backend/go/locate-anything-cpp/Makefile b/backend/go/locate-anything-cpp/Makefile index ba12c7195..c66d57764 100644 --- a/backend/go/locate-anything-cpp/Makefile +++ b/backend/go/locate-anything-cpp/Makefile @@ -33,6 +33,8 @@ else ifeq ($(BUILD_TYPE),hipblas) else ifeq ($(BUILD_TYPE),vulkan) CMAKE_ARGS+=-DGGML_VULKAN=ON -DLA_GGML_VULKAN=ON else ifeq ($(OS),Darwin) + # macOS/Metal: built + published as an OCI image by CI (includeDarwin in + # .github/backend-matrix.yml) so Apple Silicon users can install this backend. ifneq ($(BUILD_TYPE),metal) CMAKE_ARGS+=-DGGML_METAL=OFF else diff --git a/backend/go/rfdetr-cpp/Makefile b/backend/go/rfdetr-cpp/Makefile index 3282720ff..448a8e78b 100644 --- a/backend/go/rfdetr-cpp/Makefile +++ b/backend/go/rfdetr-cpp/Makefile @@ -34,6 +34,8 @@ else ifeq ($(BUILD_TYPE),hipblas) else ifeq ($(BUILD_TYPE),vulkan) CMAKE_ARGS+=-DGGML_VULKAN=ON -DRFDETR_GGML_VULKAN=ON else ifeq ($(OS),Darwin) + # macOS/Metal: built + published as an OCI image by CI (includeDarwin in + # .github/backend-matrix.yml) so Apple Silicon users can install this backend. ifneq ($(BUILD_TYPE),metal) CMAKE_ARGS+=-DGGML_METAL=OFF else diff --git a/backend/go/sam3-cpp/Makefile b/backend/go/sam3-cpp/Makefile index 27b6cedf7..f91bb356a 100644 --- a/backend/go/sam3-cpp/Makefile +++ b/backend/go/sam3-cpp/Makefile @@ -31,6 +31,8 @@ else ifeq ($(BUILD_TYPE),hipblas) else ifeq ($(BUILD_TYPE),vulkan) CMAKE_ARGS+=-DGGML_VULKAN=ON else ifeq ($(OS),Darwin) + # macOS/Metal: built + published as an OCI image by CI (includeDarwin in + # .github/backend-matrix.yml) so Apple Silicon users can install this backend. ifneq ($(BUILD_TYPE),metal) CMAKE_ARGS+=-DGGML_METAL=OFF else diff --git a/backend/index.yaml b/backend/index.yaml index 4a7a07d82..bc51cf68e 100644 --- a/backend/index.yaml +++ b/backend/index.yaml @@ -340,6 +340,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-sam3-cpp" intel: "intel-sycl-f32-sam3-cpp" vulkan: "vulkan-sam3-cpp" + metal: "metal-sam3-cpp" - &rfdetrcpp name: "rfdetr-cpp" alias: "rfdetr-cpp" @@ -368,6 +369,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-rfdetr-cpp" intel: "intel-sycl-f32-rfdetr-cpp" vulkan: "vulkan-rfdetr-cpp" + metal: "metal-rfdetr-cpp" - &locateanything name: "locate-anything" alias: "locate-anything" @@ -397,6 +399,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-locate-anything-cpp" intel: "intel-sycl-f32-locate-anything-cpp" vulkan: "vulkan-locate-anything-cpp" + metal: "metal-locate-anything-cpp" - !!merge <<: *locateanything name: "locate-anything-development" capabilities: @@ -409,6 +412,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-locate-anything-cpp-development" intel: "intel-sycl-f32-locate-anything-cpp-development" vulkan: "vulkan-locate-anything-cpp-development" + metal: "metal-locate-anything-cpp-development" - !!merge <<: *locateanything name: "cpu-locate-anything-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-locate-anything-cpp" @@ -419,6 +423,16 @@ uri: "quay.io/go-skynet/local-ai-backends:master-cpu-locate-anything-cpp" mirrors: - localai/localai-backends:master-cpu-locate-anything-cpp +- !!merge <<: *locateanything + name: "metal-locate-anything-cpp" + uri: "quay.io/go-skynet/local-ai-backends:latest-metal-darwin-arm64-locate-anything-cpp" + mirrors: + - localai/localai-backends:latest-metal-darwin-arm64-locate-anything-cpp +- !!merge <<: *locateanything + name: "metal-locate-anything-cpp-development" + uri: "quay.io/go-skynet/local-ai-backends:master-metal-darwin-arm64-locate-anything-cpp" + mirrors: + - localai/localai-backends:master-metal-darwin-arm64-locate-anything-cpp - !!merge <<: *locateanything name: "cuda12-locate-anything-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-gpu-nvidia-cuda-12-locate-anything-cpp" @@ -517,6 +531,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-depth-anything-cpp" intel: "intel-sycl-f32-depth-anything-cpp" vulkan: "vulkan-depth-anything-cpp" + metal: "metal-depth-anything-cpp" - !!merge <<: *depthanything name: "depth-anything-development" capabilities: @@ -529,6 +544,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-depth-anything-cpp-development" intel: "intel-sycl-f32-depth-anything-cpp-development" vulkan: "vulkan-depth-anything-cpp-development" + metal: "metal-depth-anything-cpp-development" - !!merge <<: *depthanything name: "cpu-depth-anything-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-depth-anything-cpp" @@ -539,6 +555,16 @@ uri: "quay.io/go-skynet/local-ai-backends:master-cpu-depth-anything-cpp" mirrors: - localai/localai-backends:master-cpu-depth-anything-cpp +- !!merge <<: *depthanything + name: "metal-depth-anything-cpp" + uri: "quay.io/go-skynet/local-ai-backends:latest-metal-darwin-arm64-depth-anything-cpp" + mirrors: + - localai/localai-backends:latest-metal-darwin-arm64-depth-anything-cpp +- !!merge <<: *depthanything + name: "metal-depth-anything-cpp-development" + uri: "quay.io/go-skynet/local-ai-backends:master-metal-darwin-arm64-depth-anything-cpp" + mirrors: + - localai/localai-backends:master-metal-darwin-arm64-depth-anything-cpp - !!merge <<: *depthanything name: "cuda12-depth-anything-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-gpu-nvidia-cuda-12-depth-anything-cpp" @@ -3220,6 +3246,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-sam3-cpp-development" intel: "intel-sycl-f32-sam3-cpp-development" vulkan: "vulkan-sam3-cpp-development" + metal: "metal-sam3-cpp-development" - !!merge <<: *sam3cpp name: "cpu-sam3-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-sam3-cpp" @@ -3230,6 +3257,16 @@ uri: "quay.io/go-skynet/local-ai-backends:master-cpu-sam3-cpp" mirrors: - localai/localai-backends:master-cpu-sam3-cpp +- !!merge <<: *sam3cpp + name: "metal-sam3-cpp" + uri: "quay.io/go-skynet/local-ai-backends:latest-metal-darwin-arm64-sam3-cpp" + mirrors: + - localai/localai-backends:latest-metal-darwin-arm64-sam3-cpp +- !!merge <<: *sam3cpp + name: "metal-sam3-cpp-development" + uri: "quay.io/go-skynet/local-ai-backends:master-metal-darwin-arm64-sam3-cpp" + mirrors: + - localai/localai-backends:master-metal-darwin-arm64-sam3-cpp - !!merge <<: *sam3cpp name: "cuda12-sam3-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-gpu-nvidia-cuda-12-sam3-cpp" @@ -3303,6 +3340,7 @@ nvidia-l4t-cuda-13: "cuda13-nvidia-l4t-arm64-rfdetr-cpp-development" intel: "intel-sycl-f32-rfdetr-cpp-development" vulkan: "vulkan-rfdetr-cpp-development" + metal: "metal-rfdetr-cpp-development" - !!merge <<: *rfdetrcpp name: "cpu-rfdetr-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-rfdetr-cpp" @@ -3313,6 +3351,16 @@ uri: "quay.io/go-skynet/local-ai-backends:master-cpu-rfdetr-cpp" mirrors: - localai/localai-backends:master-cpu-rfdetr-cpp +- !!merge <<: *rfdetrcpp + name: "metal-rfdetr-cpp" + uri: "quay.io/go-skynet/local-ai-backends:latest-metal-darwin-arm64-rfdetr-cpp" + mirrors: + - localai/localai-backends:latest-metal-darwin-arm64-rfdetr-cpp +- !!merge <<: *rfdetrcpp + name: "metal-rfdetr-cpp-development" + uri: "quay.io/go-skynet/local-ai-backends:master-metal-darwin-arm64-rfdetr-cpp" + mirrors: + - localai/localai-backends:master-metal-darwin-arm64-rfdetr-cpp - !!merge <<: *rfdetrcpp name: "cuda12-rfdetr-cpp" uri: "quay.io/go-skynet/local-ai-backends:latest-gpu-nvidia-cuda-12-rfdetr-cpp"