install.sh: install the CUDA 12.8 torch before requirements.txt (the PyPI default wheel was cu132 and satisfied torch>=2.6)

This commit is contained in:
alex committed 2026-11-24 08:33:15 +00:00
1 parent 2d2a81167b
commit a6775361e2
1 file changed
+3 -1
+3 -1
View File
@@ -268,13 +268,15 @@ setup_engine_venv() {
return
fi
run uv venv --python 3.12 "$engine_dir/.venv"
run uv pip install --python "$engine_dir/.venv" -r "$engine_dir/requirements.txt"
if [ "$GPU_VENDOR" = "nvidia" ]; then
# torch first: requirements.txt only says torch>=2.6, and PyPI's default wheel is built for a newer CUDA than
# many installed drivers support (seen: torch 2.15+cu132 on a driver that stops at CUDA 13.0).
step "NVIDIA GPU detected: installing CUDA 12.8 torch build"
run uv pip install --python "$engine_dir/.venv" torch --index-url https://download.pytorch.org/whl/cu128
else
log " no NVIDIA GPU detected, skipping CUDA torch (engine will run CPU-only or be unavailable)"
fi
run uv pip install --python "$engine_dir/.venv" -r "$engine_dir/requirements.txt"
}
do_install() {