From 5f9f1426e6829cd33a2a1b1a195eca3932857931 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Mar 2026 06:14:23 -0700 Subject: [PATCH] Fix CUDA build: use PyTorch CUDA index URL explicitly Default torch on PyPI is CPU-only on Windows. Must use PyTorch's own package index (cu126) to get CUDA-enabled wheels. This also pins the CUDA version on Linux for deterministic builds. Co-Authored-By: Claude Opus 4.6 --- python/build_sidecar.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/build_sidecar.py b/python/build_sidecar.py index 57149b8..a1d65ab 100644 --- a/python/build_sidecar.py +++ b/python/build_sidecar.py @@ -119,8 +119,11 @@ def create_venv_and_install(cpu_only: bool) -> Path: "--index-url", "https://download.pytorch.org/whl/cpu", ) else: - print("[build] Installing PyTorch (default, may include CUDA)") - pip_install("torch", "torchaudio") + print("[build] Installing PyTorch (CUDA 12.6)") + pip_install( + "torch", "torchaudio", + "--index-url", "https://download.pytorch.org/whl/cu126", + ) # Install project and dev deps (includes pyinstaller) print("[build] Installing project dependencies")