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
chenpangpang
open-webui
Commits
f87a1c95
Unverified
Commit
f87a1c95
authored
Jan 09, 2024
by
Tanvir
Browse files
refactor: update run-ollama-docker.sh
parent
93c73d35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
run-ollama-docker.sh
run-ollama-docker.sh
+6
-4
No files found.
run-ollama-docker.sh
View file @
f87a1c95
#!/bin/bash
read
-r
-p
"Do you want ollama in
d
ocker with GPU support? (y/n): "
use_gpu
read
-r
-p
"Do you want ollama in
D
ocker with GPU support? (y/n): "
use_gpu
docker
rm
-f
ollama
||
true
docker pull ollama/ollama:latest
docker_args
=
"-d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama"
if
[
"
$use_gpu
"
==
"y"
]
;
then
docker run
-d
--gpus
=
all
-v
ollama:/root/.ollama
-p
11434:11434
--name
ollama ollama/ollama
else
docker run
-d
-v
ollama:/root/.ollama
-p
11434:11434
--name
ollama ollama/ollama
docker_args+
=
" --gpus=all"
fi
docker run
"
$docker_args
"
docker image prune
-f
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