Files
raea/tools/sao/setup.sh
shinyobjectz 4d44519fc1 Local models install and run on a Mac, Windows or Linux with nothing installed first
Each local model's setup is now tools/<model>/setup.py (standard library only, on tools/local_setup.py), run by uv
on any OS as raea runs it: uv on the PATH, else raea's own uv 0.12.24 fetched once into ~/.cache/raea-tools/uv (where
tools/ensure.sh puts it) and checked against its SHA-256. The setup.sh beside each is a wrapper for a Mac or Linux.
Until now each setup was a sh script needing uv already installed (brew install uv), so Windows had no way to
install any local model.

- SAO: Core ML on a Mac, ONNX Runtime elsewhere (CUDA where nvidia-smi finds a GPU; RAEA_SAO_CUDA=0|1); its WAV is
  written by Python's wave module, not an installed ffmpeg (same samples)
- matchmove, splat: footage read through PyAV, whose wheels carry FFmpeg's libraries (no ffmpeg/ffprobe needed);
  splat fetches Brush v0.3.0's release build for macOS arm64, Linux x86_64 or Windows x86_64, each SHA-256 checked
- goo: Taichi on Metal on a Mac, else its best GPU (CUDA, Vulkan) or the CPU; the backend is reported as run
- TokenSynth: its code as GitHub's archive at a pinned commit (no git); coremltools only on a Mac
- the engine runs .venv\Scripts\python.exe on Windows (venv_python), Brush's brush_app.exe
- tools/release.sh ships tools/local_setup.py
2026-11-18 16:24:45 -08:00

17 lines
928 B
Bash
Executable File

#!/bin/sh
# sao's setup on a Mac or Linux: setup.py beside this (what it installs, where, how big), run through uv as raea runs it
# on the model's first use (raea_io_assets::run_setup). On Windows:
# uv run --no-project --python 3.11 python -I tools\sao\setup.py
# uv: $UV, the one on the PATH, raea's own (~/.cache/raea-tools/uv), else on an Apple-silicon Mac tools/ensure.sh
# fetches that one now.
# tools/sao/setup.sh
set -e
here=$(cd "$(dirname "$0")" && pwd)
own=${RAEA_TOOLS_CACHE:-$HOME/.cache/raea-tools}/uv/uv
UV=${UV:-$(command -v uv || true)}
[ -n "$UV" ] || [ ! -x "$own" ] || UV=$own
[ -n "$UV" ] || [ "$(uname -sm)" != "Darwin arm64" ] || UV=$("$here/../ensure.sh" uv)
[ -n "$UV" ] || { echo "sao setup: needs uv: install it (https://docs.astral.sh/uv), or let raea fetch its own on the model's first use" >&2; exit 1; }
export UV
exec "$UV" run -q --no-project --python 3.11 python -I "$here/setup.py" "$@"