feat: auto-detect GPU in setup scripts, log environment at startup

- setup-windows.ps1 and setup_env.sh detect nvidia-smi for CUDA vs CPU PyTorch
- Startup logs Python version, venv path, PyTorch/CUDA/GPU, scikit-learn, librosa

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 22:12:45 +02:00
parent 3417a0f603
commit 282156e8ed
3 changed files with 41 additions and 5 deletions
+8 -2
View File
@@ -15,8 +15,14 @@ PYTHON_VERSION="3.12"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
VENV_DIR="$SCRIPT_DIR/.venv"
# CUDA version for PyTorch index URL
TORCH_INDEX="https://download.pytorch.org/whl/cu128"
# Auto-detect GPU for PyTorch index URL
if command -v nvidia-smi &>/dev/null; then
TORCH_INDEX="https://download.pytorch.org/whl/cu128"
echo "NVIDIA GPU detected — will install PyTorch with CUDA 12.8"
else
TORCH_INDEX="https://download.pytorch.org/whl/cpu"
echo "No NVIDIA GPU detected — will install CPU-only PyTorch"
fi
# ── Parse args ────────────────────────────────────────────────────────