mirror of
https://github.com/likelovewant/ollama-for-amd.git
synced 2025-12-22 06:43:57 +00:00
check cuda installed before installing
This commit is contained in:
@@ -117,6 +117,11 @@ check_gpu() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if check_gpu nvidia-smi; then
|
||||||
|
status "NVIDIA GPU installed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if ! check_gpu lspci && ! check_gpu lshw; then
|
if ! check_gpu lspci && ! check_gpu lshw; then
|
||||||
warning "No NVIDIA GPU detected. Ollama will run in CPU-only mode."
|
warning "No NVIDIA GPU detected. Ollama will run in CPU-only mode."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -228,3 +233,6 @@ if ! lsmod | grep -q nvidia; then
|
|||||||
|
|
||||||
$SUDO modprobe nvidia
|
$SUDO modprobe nvidia
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
status "NVIDIA GPU installed."
|
||||||
|
|||||||
Reference in New Issue
Block a user