fix: ensure setup scripts use correct PyTorch index for transitive deps
pip install -r requirements.txt can pull CPU-only torchvision via transitive dependencies (timm, ultralytics). Adding --extra-index-url with the CUDA wheel index ensures all torch packages stay on the correct build. Applied to both Linux and Windows setup scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ pip install torch torchaudio torchvision --index-url $torchIndex
|
||||
|
||||
# ── Python deps ───────────────────────────────────────────
|
||||
Write-Host "`nInstalling project dependencies..."
|
||||
pip install -r (Join-Path $root "requirements.txt")
|
||||
pip install -r (Join-Path $root "requirements.txt") --extra-index-url $torchIndex
|
||||
|
||||
# ── libmpv ────────────────────────────────────────────────
|
||||
$mpvDll = Join-Path $root "libmpv-2.dll"
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ setup_conda() {
|
||||
pip install torch torchaudio torchvision --index-url "$TORCH_INDEX"
|
||||
|
||||
echo " Installing project dependencies..."
|
||||
pip install -r "$SCRIPT_DIR/requirements.txt"
|
||||
pip install -r "$SCRIPT_DIR/requirements.txt" --extra-index-url "$TORCH_INDEX"
|
||||
|
||||
echo ""
|
||||
echo "Done! Activate with:"
|
||||
@@ -94,7 +94,7 @@ setup_venv() {
|
||||
pip install torch torchaudio torchvision --index-url "$TORCH_INDEX"
|
||||
|
||||
echo " Installing project dependencies..."
|
||||
pip install -r "$SCRIPT_DIR/requirements.txt"
|
||||
pip install -r "$SCRIPT_DIR/requirements.txt" --extra-index-url "$TORCH_INDEX"
|
||||
|
||||
echo ""
|
||||
echo "Done! Activate with:"
|
||||
|
||||
Reference in New Issue
Block a user