コンテンツにスキップ
#0103
Daemon

Boot a model, then a worker, then a queue: in that order

Your inference stack has three pieces. Ollama loads a 7B model into VRAM (slow: 40 seconds). A Python worker connects to Ollama and pulls jobs from Redis. Redis itself needs to come up before either. If anything starts in the wrong order, the worker hits BACKOFF, retries five times, then FATAL.

You declare three daemon programs. Redis: priority: 1, boot: true. Ollama: priority: 5, boot: true, with delay_seconds: 10 so VRAM has time to clear if the container restarts hot. Python worker: priority: 10, boot: true. The container reboots: Redis comes up, Ollama loads weights, the worker connects to a warm cache and a ready model.

Three programs, three priorities, one boot sequence: the dependency graph fits in ten lines of JSON. No init container, no entrypoint shell script, no wait-for-ollama.sh you copy from a Gist.

Three programs, three priorities, one boot sequence: the dependency graph fits in ten lines of JSON.