Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
110ae89a
"src/vscode:/vscode.git/clone" did not exist on "02ca026676256cd67630eac54ad16beca739c84c"
Unverified
Commit
110ae89a
authored
Sep 25, 2023
by
Michael Yang
Committed by
GitHub
Sep 25, 2023
Browse files
Merge pull request #596 from jmorganca/mxyng/install.sh
update install.sh
parents
5306b026
5e388f93
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
scripts/install.sh
scripts/install.sh
+12
-1
No files found.
scripts/install.sh
View file @
110ae89a
...
@@ -82,6 +82,7 @@ Group=ollama
...
@@ -82,6 +82,7 @@ Group=ollama
Restart=always
Restart=always
RestartSec=3
RestartSec=3
Environment="HOME=/usr/share/ollama"
Environment="HOME=/usr/share/ollama"
Environment="PATH=
$PATH
"
[Install]
[Install]
WantedBy=default.target
WantedBy=default.target
...
@@ -92,7 +93,9 @@ EOF
...
@@ -92,7 +93,9 @@ EOF
status
"Enabling and starting ollama service..."
status
"Enabling and starting ollama service..."
$SUDO
systemctl daemon-reload
$SUDO
systemctl daemon-reload
$SUDO
systemctl
enable
ollama
$SUDO
systemctl
enable
ollama
$SUDO
systemctl restart ollama
start_service
()
{
$SUDO
systemctl restart ollama
;
}
trap
start_service EXIT
;;
;;
esac
esac
}
}
...
@@ -114,6 +117,11 @@ check_gpu() {
...
@@ -114,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
...
@@ -225,3 +233,6 @@ if ! lsmod | grep -q nvidia; then
...
@@ -225,3 +233,6 @@ if ! lsmod | grep -q nvidia; then
$SUDO
modprobe nvidia
$SUDO
modprobe nvidia
fi
fi
status
"NVIDIA GPU installed."
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment