mirror of
https://github.com/mudler/LocalAI.git
synced 2025-12-27 00:19:25 -05:00
18 lines
410 B
Bash
Executable File
18 lines
410 B
Bash
Executable File
#!/bin/bash
|
|
backend_dir=$(dirname $0)
|
|
if [ -d $backend_dir/common ]; then
|
|
source $backend_dir/common/libbackend.sh
|
|
else
|
|
source $backend_dir/../common/libbackend.sh
|
|
fi
|
|
|
|
if [ -d "/opt/intel" ]; then
|
|
# Assumes we are using the Intel oneAPI container image
|
|
# https://github.com/intel/intel-extension-for-pytorch/issues/538
|
|
export XPU=1
|
|
fi
|
|
|
|
export PYTORCH_ENABLE_MPS_FALLBACK=1
|
|
|
|
startBackend $@
|