From 9af231d72df8963c6e605739c9bcc7b6d16f2c50 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 11 Dec 2025 11:01:03 +0100 Subject: [PATCH] fix(stacks): configure ollama for stability and persistent model loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - OLLAMA_NUM_PARALLEL=1: Process requests sequentially to avoid batch overflow panics when multiple services call embeddings concurrently - OLLAMA_KEEP_ALIVE=-1: Keep models loaded in VRAM indefinitely - OLLAMA_MAX_LOADED_MODELS=2: Allow both mistral-nemo and nomic-embed-text to stay loaded simultaneously 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- stacks/ollama.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stacks/ollama.yml b/stacks/ollama.yml index 9d0fd6f..3acdf94 100644 --- a/stacks/ollama.yml +++ b/stacks/ollama.yml @@ -22,6 +22,12 @@ services: - TZ=Europe/Amsterdam - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=all + # Process requests sequentially to avoid batch overflow panics + - OLLAMA_NUM_PARALLEL=1 + # Keep models loaded in VRAM (don't unload after idle) + - OLLAMA_KEEP_ALIVE=-1 + # Load multiple models concurrently (mistral-nemo + nomic-embed-text) + - OLLAMA_MAX_LOADED_MODELS=2 deploy: resources: limits: