From 35b28969beeb885733a0f024e0f8e36bdffd253a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 29 Sep 2025 10:24:25 +0200 Subject: [PATCH] Update PyTorch install commands for GPU detection Simplifies PyTorch, torchvision, and torchaudio installation by removing version constraints and adding appropriate index URLs for Intel and CPU-only setups. Also clarifies log messages and changes the default case to 'CPU' for no GPU detected. --- install/viseron-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/viseron-install.sh b/install/viseron-install.sh index 82b620e5..e7509bcd 100644 --- a/install/viseron-install.sh +++ b/install/viseron-install.sh @@ -63,27 +63,27 @@ case "$GPU_VENDOR" in NVIDIA) msg_info "NVIDIA GPU detected → Installing PyTorch with CUDA" UV_HTTP_TIMEOUT=1200 uv pip install --python /opt/viseron/.venv/bin/python \ - 'torch>=2.2,<3.0' 'torchvision>=0.17,<1.0' 'torchaudio>=2.2,<3.0' + torch torchvision torchaudio msg_ok "Installed Torch with CUDA" ;; Intel) - msg_info "Intel GPU detected → Installing PyTorch with Intel Extension" + msg_info "Intel GPU detected → Installing PyTorch with Intel Extension (CPU wheels)" UV_HTTP_TIMEOUT=1200 uv pip install --python /opt/viseron/.venv/bin/python \ - 'torch>=2.2,<3.0' 'torchvision>=0.17,<1.0' 'torchaudio>=2.2,<3.0' \ - intel-extension-for-pytorch + torch torchvision torchaudio intel-extension-for-pytorch \ + --extra-index-url https://download.pytorch.org/whl/cpu msg_ok "Installed Torch with Intel Extension" ;; AMD) msg_info "AMD GPU detected → Installing PyTorch with ROCm" UV_HTTP_TIMEOUT=1200 uv pip install --python /opt/viseron/.venv/bin/python \ - 'torch>=2.2,<3.0' 'torchvision>=0.17,<1.0' 'torchaudio>=2.2,<3.0' \ + torch torchvision torchaudio \ --index-url https://download.pytorch.org/whl/rocm6.0 msg_ok "Installed Torch with ROCm" ;; - *) + CPU) msg_info "No GPU detected → Installing CPU-only PyTorch" UV_HTTP_TIMEOUT=1200 uv pip install --python /opt/viseron/.venv/bin/python \ - 'torch>=2.2,<3.0' 'torchvision>=0.17,<1.0' 'torchaudio>=2.2,<3.0' \ + torch torchvision torchaudio \ --extra-index-url https://download.pytorch.org/whl/cpu msg_ok "Installed Torch CPU-only" ;;