converting projects to portainer ready

This commit is contained in:
2025-11-26 18:45:55 -08:00
parent 6e280d463c
commit c2c00c0e75
25 changed files with 1374 additions and 824 deletions
+25
View File
@@ -0,0 +1,25 @@
# Ollama
Dockerhub: https://hub.docker.com/r/ollama/ollama
Github (instructions): https://github.com/open-webui/open-webui
Reverse Proxy Port webui: 8080 (The docker-compose sets the port to 3000)
## Preperation
You need to have nvidia-drivers, cuda and nvidia-container-toolkit
installed before proceeding.
docker run for refrence:
```
docker run -d --runtime=nvidia --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
docker exec -it ollama ollama pull llama3
docker 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
```
+56
View File
@@ -0,0 +1,56 @@
services:
ollama:
image: ollama/ollama
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
ports:
- "11434:11434"
volumes:
- ./data/ollama:/root/.ollama
deploy:
resources:
reservations:
devices:
- 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"
- "${VOL_PATH:-./data}/open-webui:/app/backend/data"
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "3000:8080" # Open WebUI access
ollama-cpu:
image: ollama/ollama
ports:
- "11434:11434"
volumes:
- "${VOL_PATH:-./data}/ollama:/root/.ollama"
webui-cpu:
image: ${WEBUI_IMAGE:-ghcr.io/open-webui/open-webui:cuda}
volumes:
- "${VOL_PATH:-./data}/webui:/root/.cache"
- "${VOL_PATH:-./data}/open-webui:/app/backend/data"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY}
- USE_CUDA_DOCKER=${USE_CUDA_DOCKER}
ports:
- "3000:8080" # Open WebUI access
+9
View File
@@ -0,0 +1,9 @@
VOL_PATH=./data
WEBUI_IMAGE=ghcr.io/open-webui/open-webui:cuda
# For CPU
# WEBUI_IMAGE=ghcr.io/open-webui/open-webui:main
WEBUI_SECRET_KEY=keyher
WEBUI_URL=myai.example.com
USE_CUDA_DOCKER=true