Compare commits
2 Commits
a3c657c66e
...
fd043f4172
| Author | SHA1 | Date | |
|---|---|---|---|
| fd043f4172 | |||
| 3c3b1d74bb |
+1
-1
@@ -13,7 +13,7 @@ soundfile>=0.12
|
|||||||
# or manually: pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu128
|
# or manually: pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu128
|
||||||
torch>=2.0
|
torch>=2.0
|
||||||
torchaudio>=2.0
|
torchaudio>=2.0
|
||||||
transformers>=4.30
|
transformers>=4.30,<5.0 # EAT remote model code incompatible with transformers 5.x
|
||||||
timm>=0.9
|
timm>=0.9
|
||||||
|
|
||||||
# Object detection
|
# Object detection
|
||||||
|
|||||||
+11
-13
@@ -22,21 +22,19 @@ if (Test-Path (Join-Path $venvDir "Scripts\python.exe")) {
|
|||||||
& "$venvDir\Scripts\Activate.ps1"
|
& "$venvDir\Scripts\Activate.ps1"
|
||||||
|
|
||||||
# ── PyTorch ───────────────────────────────────────────────
|
# ── PyTorch ───────────────────────────────────────────────
|
||||||
$hasTorch = python -c "import torch" 2>&1
|
# Detect NVIDIA GPU via nvidia-smi
|
||||||
if ($LASTEXITCODE -eq 0) {
|
$hasNvidia = Get-Command nvidia-smi -ErrorAction SilentlyContinue
|
||||||
Write-Host "`nPyTorch already installed, skipping." -ForegroundColor Green
|
if ($hasNvidia) {
|
||||||
|
$torchIndex = "https://download.pytorch.org/whl/cu128"
|
||||||
|
Write-Host "`nNVIDIA GPU detected — using CUDA 12.8 PyTorch index" -ForegroundColor Green
|
||||||
} else {
|
} else {
|
||||||
# Detect NVIDIA GPU via nvidia-smi
|
$torchIndex = "https://download.pytorch.org/whl/cpu"
|
||||||
$hasNvidia = Get-Command nvidia-smi -ErrorAction SilentlyContinue
|
Write-Host "`nNo NVIDIA GPU detected — using CPU-only PyTorch index" -ForegroundColor Yellow
|
||||||
if ($hasNvidia) {
|
|
||||||
Write-Host "`nNVIDIA GPU detected — installing PyTorch with CUDA 12.8..." -ForegroundColor Green
|
|
||||||
pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu128
|
|
||||||
} else {
|
|
||||||
Write-Host "`nNo NVIDIA GPU detected — installing CPU-only PyTorch..." -ForegroundColor Yellow
|
|
||||||
Write-Host "(Audio scanning will work but will be slower without GPU)" -ForegroundColor Yellow
|
|
||||||
pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cpu
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
# Always install/upgrade torch stack from correct index
|
||||||
|
# (pip install is a no-op if already at the right version)
|
||||||
|
Write-Host "Installing PyTorch + torchaudio + torchvision..."
|
||||||
|
pip install torch torchaudio torchvision --index-url $torchIndex
|
||||||
|
|
||||||
# ── Python deps ───────────────────────────────────────────
|
# ── Python deps ───────────────────────────────────────────
|
||||||
Write-Host "`nInstalling project dependencies..."
|
Write-Host "`nInstalling project dependencies..."
|
||||||
|
|||||||
Reference in New Issue
Block a user