mirror of
https://github.com/mudler/LocalAI.git
synced 2026-06-24 16:49:06 -04:00
Same fix as trl: the darwin/MPS build installs with pip (USE_PIP=true), which rejects the uv-only --index-strategy flag and failed the darwin backend build. Add it only on the uv path; Linux/CUDA resolution is unchanged. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:opus-4.8 [Claude Code]
25 lines
888 B
Bash
Executable File
25 lines
888 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# liquid-audio requires Python ≥ 3.12 (per its pyproject.toml); the default
|
|
# portable Python in libbackend.sh is 3.10. Override before sourcing.
|
|
export PYTHON_VERSION="${PYTHON_VERSION:-3.12}"
|
|
export PYTHON_PATCH="${PYTHON_PATCH:-11}"
|
|
|
|
backend_dir=$(dirname $0)
|
|
if [ -d $backend_dir/common ]; then
|
|
source $backend_dir/common/libbackend.sh
|
|
else
|
|
source $backend_dir/../common/libbackend.sh
|
|
fi
|
|
|
|
# liquid-audio's torch wheels are large; allow upgrades to satisfy transitive pins
|
|
EXTRA_PIP_INSTALL_FLAGS+=" --upgrade"
|
|
# --index-strategy is a uv-only flag. The darwin/MPS build installs with pip
|
|
# (USE_PIP=true in scripts/build/python-darwin.sh), which rejects it. Only add
|
|
# it on the uv path; Linux/CUDA resolution is unchanged.
|
|
if [ "x${USE_PIP:-}" != "xtrue" ]; then
|
|
EXTRA_PIP_INSTALL_FLAGS+=" --index-strategy=unsafe-first-match"
|
|
fi
|
|
installRequirements
|