-
- Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
Description
After enabling debug mode, I got this error when LocalAI tried to load the model because the absolute path to the back end had a space in it. Looking at run.sh, it seems that none of the references to $CURDIR are escaped.
2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr ++ dirname '/Users/username/Library/Application Support/LocalAI/backends/metal-llama-cpp/run.sh' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + CURDIR='/Users/username/Library/Application Support/LocalAI/backends/metal-llama-cpp' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + cd / 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + echo 'CPU info:' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stdout CPU info: 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + grep -e 'model\sname' /proc/cpuinfo 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + head -1 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr grep: /proc/cpuinfo: No such file or directory 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + grep -e flags /proc/cpuinfo 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + head -1 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr grep: /proc/cpuinfo: No such file or directory 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + BINARY=llama-cpp-fallback 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + grep -q -e '\savx\s' /proc/cpuinfo 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr grep: /proc/cpuinfo: No such file or directory 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + grep -q -e '\savx2\s' /proc/cpuinfo 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr grep: /proc/cpuinfo: No such file or directory 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + grep -q -e '\savx512f\s' /proc/cpuinfo 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr grep: /proc/cpuinfo: No such file or directory 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + '[' -n '' ']' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr ++ uname 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + '[' Darwin == Darwin ']' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + export 'DYLD_LIBRARY_PATH=/Users/username/Library/Application Support/LocalAI/backends/metal-llama-cpp/lib:' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + DYLD_LIBRARY_PATH='/Users/username/Library/Application Support/LocalAI/backends/metal-llama-cpp/lib:' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + '[' -f /Users/username/Library/Application Support/LocalAI/backends/metal-llama-cpp/lib/ld.so ']' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr run.sh: line 52: [: /Users/username/Library/Application: binary operator expected 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + echo 'Using binary: llama-cpp-fallback' 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stdout Using binary: llama-cpp-fallback 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr + exec /Users/username/Library/Application Support/LocalAI/backends/metal-llama-cpp/llama-cpp-fallback --addr 127.0.0.1:60885 2:31PM DBG GRPC(qwen2.5-coder-32b-instruct-127.0.0.1:60885): stderr run.sh: line 59: /Users/username/Library/Application: No such file or directory