mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-03 18:36:22 +00:00
ollama ready, handbrake now notes
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
# Handbrake
|
# Handbrake
|
||||||
|
|
||||||
|
Handbrake requires changing the env file and modification of a configuration file.
|
||||||
|
I've decided these factors are not ideal for a dockhand deployment.
|
||||||
|
However all the information you need are in these notes, they just need to be modifed for proper use.
|
||||||
|
|
||||||
- DockerHub: https://hub.docker.com/r/jlesage/handbrake
|
- DockerHub: https://hub.docker.com/r/jlesage/handbrake
|
||||||
- Env docs: https://github.com/jlesage/docker-handbrake
|
- Env docs: https://github.com/jlesage/docker-handbrake
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
VOL_PATH=/data
|
VOL_PATH=/data
|
||||||
HANDBRAKE_IMAGE=jlesage/handbrake:latest #CPU
|
#CPU
|
||||||
#HANDBRAKE_IMAGE=zocker160/handbrake-nvenc:18x #GPU
|
HANDBRAKE_IMAGE=jlesage/handbrake:latest
|
||||||
|
#GPU
|
||||||
|
#HANDBRAKE_IMAGE=zocker160/handbrake-nvenc:18x
|
||||||
#NVIDIA_VISIBLE_DEVICES=all #GPU
|
#NVIDIA_VISIBLE_DEVICES=all #GPU
|
||||||
#NVIDIA_DRIVER_CAPABILITIES=all #GPU
|
#NVIDIA_DRIVER_CAPABILITIES=all #GPU
|
||||||
HANDBRAKE_RESTART=unless-stopped
|
HANDBRAKE_RESTART=unless-stopped
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
# Ollama with Webui
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
There is a cpu version and a gpu version.
|
||||||
|
For ollama I'm just running latest, no version lock.
|
||||||
|
Same with standard ports, no option to change.
|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
WEBUI_SECRET_KEY is just a random secret string used to secure sessions, cookies, and auth in your WebUI. ```openssl rand -hex 32```
|
||||||
|
|
||||||
|
## Use
|
||||||
|
|
||||||
|
- [Ollama Models](https://ollama.com/search)
|
||||||
|
|
||||||
|
When using the webui for the first time after an upgrade, you will need to wait a long time. This is due to the model pulling process.
|
||||||
|
|
||||||
|
### Docker Container Cheatsheet
|
||||||
|
|
||||||
|
You can alias:
|
||||||
|
```bash
|
||||||
|
alias ollamac="docker compose exec -it ollama ollama"
|
||||||
|
|
||||||
|
#example then would be
|
||||||
|
ollamac list
|
||||||
|
```
|
||||||
|
|
||||||
|
Standard commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add/Pull a model
|
||||||
|
docker compose exec -it ollama ollama pull llama3.1:8b-instruct-q4_0
|
||||||
|
|
||||||
|
# list models
|
||||||
|
docker compose exec -it ollama ollama list
|
||||||
|
|
||||||
|
# Remove a model
|
||||||
|
docker compose exec -it ollama ollama rm <model-name>
|
||||||
|
|
||||||
|
# Run CLI
|
||||||
|
docker compose exec -it ollama ollama run deebseek-r1:8b "What is Star Trek?"
|
||||||
|
```
|
||||||
|
|
||||||
|
### API
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl http://ollama.lan:11434/api/tags
|
||||||
|
```
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
|
||||||
|
Straight docker run:
|
||||||
|
```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
|
||||||
|
```
|
||||||
|
## Recommended Pulls
|
||||||
|
|
||||||
|
For a NVIDIA GeForce RTX 5060 Ti, your GPU may vary.
|
||||||
|
|
||||||
|
```
|
||||||
|
Generating prompts for InvokeAI
|
||||||
|
ollama pull llama3.1:8b
|
||||||
|
ollama pull mistral:7b-instruct
|
||||||
|
ollama pull mythomax-l2:13b
|
||||||
|
|
||||||
|
Generating PHP code
|
||||||
|
ollama pull codellama:13b-code
|
||||||
|
ollama pull deepseek-coder:6.7b-instruct
|
||||||
|
ollama pull wizardcoder:15b
|
||||||
|
|
||||||
|
Help with writing a book
|
||||||
|
ollama pull llama3.1:70b-instruct
|
||||||
|
ollama pull mythomax-l2:13b
|
||||||
|
ollama pull openhermes2.5-mistral:7b
|
||||||
|
|
||||||
|
Help with psychology questions/learning
|
||||||
|
ollama pull samantha-mistral:7b
|
||||||
|
ollama pull openchat:7b
|
||||||
|
ollama pull nous-hermes2-mixtral:8x7b-dpo
|
||||||
|
|
||||||
|
n8n agents
|
||||||
|
ollama pull qwen2.5-coder:7b-instruct
|
||||||
|
ollama pull llama3.1:8b-instruct
|
||||||
|
ollama pull gorilla-openfunctions-v2:7b
|
||||||
|
|
||||||
|
Summarizing documents
|
||||||
|
ollama pull granite3.2:8b-instruct
|
||||||
|
ollama pull cognitivetech/obook_summary:7b
|
||||||
|
ollama pull bge-m3:8b
|
||||||
|
```
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# Ollama CPU
|
||||||
|
|
||||||
|
services:
|
||||||
|
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:main}
|
||||||
|
volumes:
|
||||||
|
- "${VOL_PATH:-/data}/webui/cache:/root/.cache"
|
||||||
|
- "${VOL_PATH:-/data}/webui/data:/app/backend/data"
|
||||||
|
environment:
|
||||||
|
- WEBUI_URL=${WEBUI_URL:-http://localhost:8080}
|
||||||
|
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:?must_be_set}
|
||||||
|
- OLLAMA_BASE_URL=http://ollama-cpu:11434
|
||||||
|
ports:
|
||||||
|
- "${WEBUI_PORT:-8080}:8080"
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Ollama GPU
|
||||||
|
services:
|
||||||
|
ollama:
|
||||||
|
image: ollama/ollama
|
||||||
|
volumes:
|
||||||
|
- ${VOL_PATH}/ollama:/root/.ollama
|
||||||
|
runtime: nvidia
|
||||||
|
environment:
|
||||||
|
- NVIDIA_VISIBLE_DEVICES=all
|
||||||
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
||||||
|
ports:
|
||||||
|
- "11434:11434"
|
||||||
|
|
||||||
|
webui:
|
||||||
|
image: ${WEBUI_IMAGE:-ghcr.io/open-webui/open-webui:main}
|
||||||
|
volumes:
|
||||||
|
- "${VOL_PATH:-/data}/webui:/root/.cache"
|
||||||
|
- "${VOL_PATH:-/data}/open-webui:/app/backend/data"
|
||||||
|
environment:
|
||||||
|
- WEBUI_URL=${WEBUI_URL:-http://localhost:8080}
|
||||||
|
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:?must_be_set}
|
||||||
|
- OLLAMA_BASE_URL=http://ollama:11434
|
||||||
|
ports:
|
||||||
|
- "${WEBUI_PORT:-8080}:8080"
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
VOL_PATH=/data
|
||||||
|
WEBUI_IMAGE=ghcr.io/open-webui/open-webui:main
|
||||||
|
WEBUI_PORT=8080
|
||||||
|
WEBUI_SECRET_KEY=a2dddd88c9da5f25786a0eb6e48e66305ee999d2adac8f8af821f82f11f56441 # ChangeMe openssl rand -hex 32
|
||||||
|
WEBUI_URL=ollama.lan
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# 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
|
|
||||||
```
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
VOL_PATH=./data
|
VOL_PATH=/data
|
||||||
|
|
||||||
# --- Application Settings ---
|
# --- Application Settings ---
|
||||||
# Set to 'production' for production environments
|
# Set to 'production' for production environments
|
||||||
|
|||||||
Reference in New Issue
Block a user