Explorar o código

check cuda installed before installing

Michael Yang hai 1 ano
pai
achega
5e388f931e
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      scripts/install.sh

+ 8 - 0
scripts/install.sh

@@ -117,6 +117,11 @@ check_gpu() {
     esac
 }
 
+if check_gpu nvidia-smi; then
+    status "NVIDIA GPU installed."
+    exit 0
+fi
+
 if ! check_gpu lspci && ! check_gpu lshw; then
     warning "No NVIDIA GPU detected. Ollama will run in CPU-only mode."
     exit 0
@@ -228,3 +233,6 @@ if ! lsmod | grep -q nvidia; then
 
     $SUDO modprobe nvidia
 fi
+
+
+status "NVIDIA GPU installed."