mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
added webui
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
Dockerhub: https://hub.docker.com/r/ollama/ollama
|
||||
|
||||
Reverse Proxy Port webui: 7860
|
||||
|
||||
## Preperation
|
||||
|
||||
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 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
|
||||
```
|
||||
@@ -3,7 +3,6 @@ version: '3.8'
|
||||
services:
|
||||
ollama:
|
||||
image: ollama/ollama
|
||||
container_name: ollama
|
||||
runtime: nvidia
|
||||
environment:
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
@@ -18,3 +17,21 @@ services:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
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
|
||||
@@ -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
|
||||
@@ -0,0 +1,2 @@
|
||||
VOL_PATH=./data
|
||||
WEBUI_IMAGE=ghcr.io/open-webui/open-webui:cuda
|
||||
Reference in New Issue
Block a user