mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-12 14:22:11 -04:00
The editable install records the backend build path, which does not exist after LocalAI relocates the packaged backend. Add the runtime source directory to PYTHONPATH so inference modules remain importable. Assisted-by: Codex:gpt-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
24 lines
627 B
Bash
24 lines
627 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
|
WORK_DIR=$(mktemp -d)
|
|
trap 'rm -rf "$WORK_DIR"' EXIT
|
|
|
|
mkdir -p "$WORK_DIR/runtime/common" "$WORK_DIR/runtime/fish-speech-src/fish_speech"
|
|
cp "$SCRIPT_DIR/run.sh" "$WORK_DIR/runtime/run.sh"
|
|
|
|
cat > "$WORK_DIR/runtime/fish-speech-src/fish_speech/inference_engine.py" <<'PY'
|
|
IMPORT_OK = True
|
|
PY
|
|
|
|
cat > "$WORK_DIR/runtime/common/libbackend.sh" <<'SH'
|
|
startBackend() {
|
|
python3 -c 'from fish_speech.inference_engine import IMPORT_OK; assert IMPORT_OK'
|
|
}
|
|
SH
|
|
|
|
bash "$WORK_DIR/runtime/run.sh"
|
|
|
|
echo "PASS: runtime launcher imports relocated fish-speech source"
|