mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-13 06:45:26 -04:00
fix: prefer the Intel diffusers venv SYCL runtime at startup (#11971)
Fixes #11895 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
1 parent
a8ff0c3a6e
commit
8a0548714d
3 files changed
+242
No files matched your search
@@ -563,6 +563,18 @@ function startBackend() {
|
||||
echo "Added ${EDIR}/lib to LD_LIBRARY_PATH for GPU libraries"
|
||||
fi
|
||||
|
||||
# XPU wheels carry a matching SYCL/Unified Runtime set. Prefer it over
|
||||
# packaged oneAPI or host libraries, which may expose an older loader ABI.
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
local sycl_runtime
|
||||
for sycl_runtime in "${EDIR}/venv/lib"/libsycl.so*; do
|
||||
if [ -f "${sycl_runtime}" ]; then
|
||||
export LD_LIBRARY_PATH="${EDIR}/venv/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -z "${BACKEND_FILE:-}" ]; then
|
||||
exec "${EDIR}/venv/bin/python" "${BACKEND_FILE}" "$@"
|
||||
elif [ -e "${MY_DIR}/server.py" ]; then
|
||||
|
||||
Reference in new issue
Block a user