mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
Ollama unloads an idle model after five minutes by default. Preloading pulls the model at deploy time but only the first inference loads it into memory, so a consumer prompting a while after the deploy pays a cold load that eats into its own provider timeout. Declare keep_alive next to preload_async_time in the services SPOT, read it in vars like its neighbours, and pass it to the container as OLLAMA_KEEP_ALIVE. `-1` keeps the model loaded indefinitely; `ollama ps` then reports UNTIL: Forever instead of Stopping... This removes real latency but it is not what fixed the zammad timeout that prompted it: that was a model which never emitted a stop token, addressed separately. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>