From 83b1aa966bb4cb981fa13b84b16573f108c1b132 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Fri, 17 Apr 2026 15:23:04 +0000 Subject: [PATCH] ollama ready, handbrake now notes --- {handbrake => handbrake_notes}/README.md | 4 + .../compose-cpu.yaml | 0 .../compose-gpu.yaml | 0 {handbrake => handbrake_notes}/sample.env | 6 +- ollama/README.md | 106 ++++++++++++++++++ ollama/compose-cpu.yaml | 22 ++++ ollama/compose-gpu.yaml | 24 ++++ ollama/sample.env | 5 + ollama_notes/README.md | 25 ----- ollama_notes/docker-compose.yml | 56 --------- ollama_notes/sample.env | 9 -- openarchiver_dev/sample.env | 2 +- 12 files changed, 166 insertions(+), 93 deletions(-) rename {handbrake => handbrake_notes}/README.md (96%) rename {handbrake => handbrake_notes}/compose-cpu.yaml (100%) rename {handbrake => handbrake_notes}/compose-gpu.yaml (100%) rename {handbrake => handbrake_notes}/sample.env (89%) create mode 100644 ollama/README.md create mode 100644 ollama/compose-cpu.yaml create mode 100644 ollama/compose-gpu.yaml create mode 100644 ollama/sample.env delete mode 100644 ollama_notes/README.md delete mode 100644 ollama_notes/docker-compose.yml delete mode 100644 ollama_notes/sample.env diff --git a/handbrake/README.md b/handbrake_notes/README.md similarity index 96% rename from handbrake/README.md rename to handbrake_notes/README.md index be4ee2e..46ba4c8 100644 --- a/handbrake/README.md +++ b/handbrake_notes/README.md @@ -1,4 +1,8 @@ # 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 - Env docs: https://github.com/jlesage/docker-handbrake diff --git a/handbrake/compose-cpu.yaml b/handbrake_notes/compose-cpu.yaml similarity index 100% rename from handbrake/compose-cpu.yaml rename to handbrake_notes/compose-cpu.yaml diff --git a/handbrake/compose-gpu.yaml b/handbrake_notes/compose-gpu.yaml similarity index 100% rename from handbrake/compose-gpu.yaml rename to handbrake_notes/compose-gpu.yaml diff --git a/handbrake/sample.env b/handbrake_notes/sample.env similarity index 89% rename from handbrake/sample.env rename to handbrake_notes/sample.env index 1798f26..1199030 100644 --- a/handbrake/sample.env +++ b/handbrake_notes/sample.env @@ -1,6 +1,8 @@ VOL_PATH=/data -HANDBRAKE_IMAGE=jlesage/handbrake:latest #CPU -#HANDBRAKE_IMAGE=zocker160/handbrake-nvenc:18x #GPU +#CPU +HANDBRAKE_IMAGE=jlesage/handbrake:latest +#GPU +#HANDBRAKE_IMAGE=zocker160/handbrake-nvenc:18x #NVIDIA_VISIBLE_DEVICES=all #GPU #NVIDIA_DRIVER_CAPABILITIES=all #GPU HANDBRAKE_RESTART=unless-stopped diff --git a/ollama/README.md b/ollama/README.md new file mode 100644 index 0000000..af12b68 --- /dev/null +++ b/ollama/README.md @@ -0,0 +1,106 @@ +# Ollama with Webui + +![Ollama](https://i.4lt.ca/git/ollama.png) + +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 + +# 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 +``` \ No newline at end of file diff --git a/ollama/compose-cpu.yaml b/ollama/compose-cpu.yaml new file mode 100644 index 0000000..f36040f --- /dev/null +++ b/ollama/compose-cpu.yaml @@ -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" + \ No newline at end of file diff --git a/ollama/compose-gpu.yaml b/ollama/compose-gpu.yaml new file mode 100644 index 0000000..3a937c9 --- /dev/null +++ b/ollama/compose-gpu.yaml @@ -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" diff --git a/ollama/sample.env b/ollama/sample.env new file mode 100644 index 0000000..bd8cf20 --- /dev/null +++ b/ollama/sample.env @@ -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 diff --git a/ollama_notes/README.md b/ollama_notes/README.md deleted file mode 100644 index d636466..0000000 --- a/ollama_notes/README.md +++ /dev/null @@ -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 -``` diff --git a/ollama_notes/docker-compose.yml b/ollama_notes/docker-compose.yml deleted file mode 100644 index 858d883..0000000 --- a/ollama_notes/docker-compose.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/ollama_notes/sample.env b/ollama_notes/sample.env deleted file mode 100644 index 752c5ec..0000000 --- a/ollama_notes/sample.env +++ /dev/null @@ -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 diff --git a/openarchiver_dev/sample.env b/openarchiver_dev/sample.env index dd7785f..12b6cc5 100644 --- a/openarchiver_dev/sample.env +++ b/openarchiver_dev/sample.env @@ -1,4 +1,4 @@ -VOL_PATH=./data +VOL_PATH=/data # --- Application Settings --- # Set to 'production' for production environments