From 42e580bed024d2ebe1112adba930af75d4b1e34d Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Sat, 28 Feb 2026 09:10:40 +0100 Subject: [PATCH] fix: whisper breaking on cuda-13 (use absolute path for CUDA directory detection) (#8678) fix: use absolute path for CUDA directory detection The capability detection was using a relative path 'usr/local/cuda-13' which doesn't work when LocalAI is run from a different working directory. This caused whisper (and other backends) to fail on CUDA-13 containers because the system incorrectly detected 'nvidia' capability instead of 'nvidia-cuda-13', leading to wrong backend selection (cuda12-whisper instead of cuda13-whisper). Fixes: https://github.com/mudler/LocalAI/issues/8033 Co-authored-by: localai-bot --- pkg/system/capabilities.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/system/capabilities.go b/pkg/system/capabilities.go index fc26f617f..bbff3b8e2 100644 --- a/pkg/system/capabilities.go +++ b/pkg/system/capabilities.go @@ -50,9 +50,9 @@ var ( ) func init() { - _, err := os.Stat(filepath.Join("usr", "local", "cuda-13")) + _, err := os.Stat(filepath.Join(string(os.PathSeparator), "usr", "local", "cuda-13")) cuda13DirExists = err == nil - _, err = os.Stat(filepath.Join("usr", "local", "cuda-12")) + _, err = os.Stat(filepath.Join(string(os.PathSeparator), "usr", "local", "cuda-12")) cuda12DirExists = err == nil }