added webui

This commit is contained in:
2024-08-10 01:08:27 -07:00
parent af93e1c729
commit 4497dc4690
4 changed files with 41 additions and 1 deletions
+9
View File
@@ -2,6 +2,8 @@
Dockerhub: https://hub.docker.com/r/ollama/ollama Dockerhub: https://hub.docker.com/r/ollama/ollama
Reverse Proxy Port webui: 7860
## Preperation ## Preperation
You need to have nvidia-drivers, cuda and nvidia-container-toolkit You need to have nvidia-drivers, cuda and nvidia-container-toolkit
@@ -13,4 +15,11 @@ docker run -d --runtime=nvidia --gpus=all -v ollama:/root/.ollama -p 11434:11434
podman exec -it ollama ollama pull llama3 podman exec -it ollama ollama pull llama3
podman exec -it ollama ollama run llama3 podman exec -it ollama ollama run llama3
```
# Notes
this worked:
```bash
docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda
``` ```
+18 -1
View File
@@ -3,7 +3,6 @@ version: '3.8'
services: services:
ollama: ollama:
image: ollama/ollama image: ollama/ollama
container_name: ollama
runtime: nvidia runtime: nvidia
environment: environment:
- NVIDIA_VISIBLE_DEVICES=all - NVIDIA_VISIBLE_DEVICES=all
@@ -18,3 +17,21 @@ services:
- driver: nvidia - driver: nvidia
count: all count: all
capabilities: [gpu] capabilities: [gpu]
webui:
image: ${WEBUI_IMAGE:-ghcr.io/open-webui/open-webui:cuda}
runtime: nvidia # Use NVIDIA runtime for GPU support
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
volumes:
- "${VOL_PATH:-./data}/webui:/root/.cache"
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "7860:7860" # Open WebUI access
+12
View File
@@ -0,0 +1,12 @@
version: '3.4'
services:
ollama:
extends:
file: ${COOKBOOK}/ollama/docker-compose.yml
service: ollama
webui:
extends:
file: ${COOKBOOK}/ollama/docker-compose.yml
service: webui
+2
View File
@@ -0,0 +1,2 @@
VOL_PATH=./data
WEBUI_IMAGE=ghcr.io/open-webui/open-webui:cuda