From 61db0ce2771f44a038a486e82bf38d5e29e58f7c Mon Sep 17 00:00:00 2001 From: juvdiaz Date: Sun, 28 Jun 2026 00:19:24 -0600 Subject: [PATCH] Normalize Ollama host configuration --- bootstrap/host/README.md | 3 +++ bootstrap/host/group_vars/debian_pc.yml | 1 + bootstrap/host/playbook.yml | 1 + homelab.yml | 1 + jeannie | 7 ++++++- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bootstrap/host/README.md b/bootstrap/host/README.md index faf4d34..f23725b 100644 --- a/bootstrap/host/README.md +++ b/bootstrap/host/README.md @@ -64,6 +64,9 @@ host, run: Installer downloads prefer IPv4 by default because some networks have broken or slow IPv6 paths to `ollama.com`. Override with `LAB_OLLAMA_INSTALL_CURL_IP_VERSION=` if you want curl's automatic behavior. +The Ryzen integrated GPU is left disabled for Ollama by default; set +`LAB_OLLAMA_IGPU_ENABLE=true` or `debian_pc_ollama_igpu_enable: "true"` when +you intentionally want to test Vulkan/iGPU inference. If the Debian host cannot reach `ollama.com`, download the matching Linux tarball from another machine, copy it to Debian, and point `jeannie` at it: diff --git a/bootstrap/host/group_vars/debian_pc.yml b/bootstrap/host/group_vars/debian_pc.yml index 704f64d..bcdc854 100644 --- a/bootstrap/host/group_vars/debian_pc.yml +++ b/bootstrap/host/group_vars/debian_pc.yml @@ -12,6 +12,7 @@ debian_pc_ollama_tarball_file: "" debian_pc_ollama_host: 0.0.0.0:11434 debian_pc_ollama_models_dir: /data/ollama/models debian_pc_ollama_default_model: qwen2.5:0.5b +debian_pc_ollama_igpu_enable: "false" debian_pc_persistent_directories: - /data/openebs/local/registry diff --git a/bootstrap/host/playbook.yml b/bootstrap/host/playbook.yml index ac276be..64b4300 100644 --- a/bootstrap/host/playbook.yml +++ b/bootstrap/host/playbook.yml @@ -318,6 +318,7 @@ [Service] Environment="OLLAMA_HOST={{ debian_pc_ollama_host }}" Environment="OLLAMA_MODELS={{ debian_pc_ollama_models_dir }}" + Environment="OLLAMA_IGPU_ENABLE={{ debian_pc_ollama_igpu_enable }}" register: debian_pc_ollama_override when: debian_pc_install_ollama | bool diff --git a/homelab.yml b/homelab.yml index 912241c..2573b15 100644 --- a/homelab.yml +++ b/homelab.yml @@ -88,6 +88,7 @@ services: url: http://192.168.100.73:11434 bind_address: 0.0.0.0:11434 models_dir: /data/ollama/models + igpu_enable: false rpi_dns: host: rpi4 pihole_dns_port: 53 diff --git a/jeannie b/jeannie index 00007fd..b16d519 100755 --- a/jeannie +++ b/jeannie @@ -60,6 +60,7 @@ mapping = { "services.local_registry.endpoint": "LAB_REGISTRY_ENDPOINT", "services.ollama.bind_address": "LAB_OLLAMA_BIND_ADDRESS", "services.ollama.models_dir": "LAB_OLLAMA_MODELS_DIR", + "services.ollama.igpu_enable": "LAB_OLLAMA_IGPU_ENABLE", "services.rpi_dns.pihole_web_port": "PIHOLE_WEB_PORT", "services.rpi_dns.uptime_kuma_port": "UPTIME_KUMA_PORT", "ai_gateway.provider": "LAB_AI_GATEWAY_PROVIDER", @@ -3393,12 +3394,16 @@ website_translation_model() { website_ollama_listen() { local bind_address="${WEBSITE_OLLAMA_BIND_ADDRESS:-${LAB_OLLAMA_BIND_ADDRESS:-0.0.0.0:11434}}" local models_dir="${LAB_OLLAMA_MODELS_DIR:-/data/ollama/models}" + local igpu_enable="${LAB_OLLAMA_IGPU_ENABLE:-false}" local dropin_dir="/etc/systemd/system/ollama.service.d" local dropin_file="${dropin_dir}/homelab.conf" local waited=0 require_debian_server "website-ollama-listen" + bind_address="${bind_address#http://}" + bind_address="${bind_address#https://}" + if ! systemctl cat ollama.service >/dev/null 2>&1; then echo "ollama.service was not found on this Debian server." >&2 exit 1 @@ -3410,7 +3415,7 @@ website_ollama_listen() { if id ollama >/dev/null 2>&1; then sudo chown ollama:ollama "${models_dir}" fi - printf '[Service]\nEnvironment="OLLAMA_HOST=%s"\nEnvironment="OLLAMA_MODELS=%s"\n' "${bind_address}" "${models_dir}" | + printf '[Service]\nEnvironment="OLLAMA_HOST=%s"\nEnvironment="OLLAMA_MODELS=%s"\nEnvironment="OLLAMA_IGPU_ENABLE=%s"\n' "${bind_address}" "${models_dir}" "${igpu_enable}" | sudo tee "${dropin_file}" >/dev/null sudo systemctl daemon-reload sudo systemctl restart ollama.service