diff --git a/scripts/install.sh b/scripts/install.sh index f3186390..cf259e86 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -125,11 +125,6 @@ if available systemctl; then configure_systemd fi -if ! available lspci && ! available lshw; then - warning "Unable to detect NVIDIA GPU. Install lspci or lshw to automatically detect and install NVIDIA CUDA drivers." - exit -fi - check_gpu() { case $1 in lspci) available lspci && lspci -d '10de:' | grep -q 'NVIDIA' || return 1 ;; @@ -143,6 +138,11 @@ if check_gpu nvidia-smi; then exit fi +if ! available lspci && ! available lshw; then + warning "Unable to detect NVIDIA GPU. Install lspci or lshw to automatically detect and install NVIDIA CUDA drivers." + exit +fi + if ! check_gpu lspci && ! check_gpu lshw; then install_success warning "No NVIDIA GPU detected. Ollama will run with CPU."