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
0c0c5955
Unverified
Commit
0c0c5955
authored
Jan 09, 2024
by
Tanvir
Browse files
feat(docker): add option to run ollama w/o GPU support
parent
e6e05d46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
run-ollama-docker.sh
run-ollama-docker.sh
+10
-5
No files found.
run-ollama-docker.sh
View file @
0c0c5955
#!/bin/bash
#!/bin/bash
read
-r
-p
"Do you want ollama in docker with GPU support? (y/n): "
use_gpu
docker
rm
-f
ollama
||
true
docker
rm
-f
ollama
||
true
docker pull ollama/ollama
docker pull ollama/ollama
# CPU Only
docker run
-d
-v
ollama:/root/.ollama
-p
11434:11434
--name
ollama ollama/ollama
if
[
"
$use_gpu
"
==
"y"
]
;
then
# GPU Support
docker run
-d
--gpus
=
all
-v
ollama:/root/.ollama
-p
11434:11434
--name
ollama ollama/ollama
# docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
else
docker image prune
-f
docker run
-d
-v
ollama:/root/.ollama
-p
11434:11434
--name
ollama ollama/ollama
\ No newline at end of file
fi
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