Setup: Update Ollama service examples in compose.yaml files #5123

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-01 12:08:33 +02:00
parent 2c17b21569
commit 7de8ee88d8
5 changed files with 81 additions and 75 deletions

View File

@@ -173,16 +173,17 @@ services:
OLLAMA_NUM_PARALLEL: "1" # maximum number of parallel requests
OLLAMA_MAX_LOADED_MODELS: "1" # maximum number of loaded models per GPU
OLLAMA_LOAD_TIMEOUT: "5m" # maximum time for loading models (default "5m")
OLLAMA_KEEP_ALIVE: "10m" # duration that models stay loaded in memory (default "5m")
OLLAMA_KEEP_ALIVE: "15m" # duration that models stay loaded in memory (default "5m")
OLLAMA_CONTEXT_LENGTH: "4096" # maximum input context length
OLLAMA_MULTIUSER_CACHE: "1" # optimize prompt caching for multi-user scenarios
# OLLAMA_DEBUG: "1" # shows additional debug information
# OLLAMA_NOPRUNE: "1" # disables pruning of model blobs at startup
# OLLAMA_NOHISTORY: "1" # disables readline history
# OLLAMA_FLASH_ATTENTION: "1" # enables the experimental flash attention feature
# OLLAMA_SCHED_SPREAD: "1" # allows scheduling models across all GPUs.
# OLLAMA_GPU_OVERHEAD: "0" # reserves a portion of VRAM per GPU (bytes)
# OLLAMA_INTEL_GPU: "1" # enables experimental Intel GPU detection
OLLAMA_MULTIUSER_CACHE: "false" # optimize prompt caching for multi-user scenarios
OLLAMA_NOPRUNE: "true" # disables pruning of model blobs at startup
OLLAMA_NOHISTORY: "true" # disables readline history
OLLAMA_FLASH_ATTENTION: "false" # enables the experimental flash attention feature
OLLAMA_KV_CACHE_TYPE: "f16" # see https://mitjamartini.com/blog/kv-cache-quantization-in-ollama/
OLLAMA_SCHED_SPREAD: "false" # allows scheduling models across all GPUs.
OLLAMA_NEW_ENGINE: "false" # enables the new Ollama engine
# OLLAMA_DEBUG: "true" # shows additional debug information
# OLLAMA_INTEL_GPU: "true" # enables experimental Intel GPU detection
## NVIDIA GPU Hardware Acceleration (see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html):
NVIDIA_VISIBLE_DEVICES: "all"
NVIDIA_DRIVER_CAPABILITIES: "compute,utility"

View File

@@ -253,16 +253,17 @@ services:
OLLAMA_NUM_PARALLEL: "1" # maximum number of parallel requests
OLLAMA_MAX_LOADED_MODELS: "1" # maximum number of loaded models per GPU
OLLAMA_LOAD_TIMEOUT: "5m" # maximum time for loading models (default "5m")
OLLAMA_KEEP_ALIVE: "10m" # duration that models stay loaded in memory (default "5m")
OLLAMA_KEEP_ALIVE: "15m" # duration that models stay loaded in memory (default "5m")
OLLAMA_CONTEXT_LENGTH: "4096" # maximum input context length
OLLAMA_MULTIUSER_CACHE: "1" # optimize prompt caching for multi-user scenarios
# OLLAMA_DEBUG: "1" # shows additional debug information
# OLLAMA_NOPRUNE: "1" # disables pruning of model blobs at startup
# OLLAMA_NOHISTORY: "1" # disables readline history
# OLLAMA_FLASH_ATTENTION: "1" # enables the experimental flash attention feature
# OLLAMA_SCHED_SPREAD: "1" # allows scheduling models across all GPUs.
# OLLAMA_GPU_OVERHEAD: "0" # reserves a portion of VRAM per GPU (bytes)
# OLLAMA_INTEL_GPU: "1" # enables experimental Intel GPU detection
OLLAMA_MULTIUSER_CACHE: "false" # optimize prompt caching for multi-user scenarios
OLLAMA_NOPRUNE: "true" # disables pruning of model blobs at startup
OLLAMA_NOHISTORY: "true" # disables readline history
OLLAMA_FLASH_ATTENTION: "false" # enables the experimental flash attention feature
OLLAMA_KV_CACHE_TYPE: "f16" # see https://mitjamartini.com/blog/kv-cache-quantization-in-ollama/
OLLAMA_SCHED_SPREAD: "false" # allows scheduling models across all GPUs.
OLLAMA_NEW_ENGINE: "false" # enables the new Ollama engine
# OLLAMA_DEBUG: "true" # shows additional debug information
# OLLAMA_INTEL_GPU: "true" # enables experimental Intel GPU detection
## NVIDIA GPU Hardware Acceleration (optional):
# NVIDIA_VISIBLE_DEVICES: "all"
# NVIDIA_DRIVER_CAPABILITIES: "compute,utility"

View File

@@ -175,16 +175,17 @@ services:
OLLAMA_NUM_PARALLEL: "1" # maximum number of parallel requests
OLLAMA_MAX_LOADED_MODELS: "1" # maximum number of loaded models per GPU
OLLAMA_LOAD_TIMEOUT: "5m" # maximum time for loading models (default "5m")
OLLAMA_KEEP_ALIVE: "10m" # duration that models stay loaded in memory (default "5m")
OLLAMA_KEEP_ALIVE: "15m" # duration that models stay loaded in memory (default "5m")
OLLAMA_CONTEXT_LENGTH: "4096" # maximum input context length
OLLAMA_MULTIUSER_CACHE: "1" # optimize prompt caching for multi-user scenarios
# OLLAMA_DEBUG: "1" # shows additional debug information
# OLLAMA_NOPRUNE: "1" # disables pruning of model blobs at startup
# OLLAMA_NOHISTORY: "1" # disables readline history
# OLLAMA_FLASH_ATTENTION: "1" # enables the experimental flash attention feature
# OLLAMA_SCHED_SPREAD: "1" # allows scheduling models across all GPUs.
# OLLAMA_GPU_OVERHEAD: "0" # reserves a portion of VRAM per GPU (bytes)
# OLLAMA_INTEL_GPU: "1" # enables experimental Intel GPU detection
OLLAMA_MULTIUSER_CACHE: "false" # optimize prompt caching for multi-user scenarios
OLLAMA_NOPRUNE: "true" # disables pruning of model blobs at startup
OLLAMA_NOHISTORY: "true" # disables readline history
OLLAMA_FLASH_ATTENTION: "false" # enables the experimental flash attention feature
OLLAMA_KV_CACHE_TYPE: "f16" # see https://mitjamartini.com/blog/kv-cache-quantization-in-ollama/
OLLAMA_SCHED_SPREAD: "false" # allows scheduling models across all GPUs.
OLLAMA_NEW_ENGINE: "false" # enables the new Ollama engine
# OLLAMA_DEBUG: "true" # shows additional debug information
# OLLAMA_INTEL_GPU: "true" # enables experimental Intel GPU detection
## NVIDIA GPU Hardware Acceleration (see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html):
# NVIDIA_VISIBLE_DEVICES: "all"
# NVIDIA_DRIVER_CAPABILITIES: "compute,utility"

View File

@@ -180,16 +180,17 @@ services:
OLLAMA_NUM_PARALLEL: "1" # maximum number of parallel requests
OLLAMA_MAX_LOADED_MODELS: "1" # maximum number of loaded models per GPU
OLLAMA_LOAD_TIMEOUT: "5m" # maximum time for loading models (default "5m")
OLLAMA_KEEP_ALIVE: "10m" # duration that models stay loaded in memory (default "5m")
OLLAMA_KEEP_ALIVE: "15m" # duration that models stay loaded in memory (default "5m")
OLLAMA_CONTEXT_LENGTH: "4096" # maximum input context length
OLLAMA_MULTIUSER_CACHE: "1" # optimize prompt caching for multi-user scenarios
# OLLAMA_DEBUG: "1" # shows additional debug information
# OLLAMA_NOPRUNE: "1" # disables pruning of model blobs at startup
# OLLAMA_NOHISTORY: "1" # disables readline history
# OLLAMA_FLASH_ATTENTION: "1" # enables the experimental flash attention feature
# OLLAMA_SCHED_SPREAD: "1" # allows scheduling models across all GPUs.
# OLLAMA_GPU_OVERHEAD: "0" # reserves a portion of VRAM per GPU (bytes)
# OLLAMA_INTEL_GPU: "1" # enables experimental Intel GPU detection
OLLAMA_MULTIUSER_CACHE: "false" # optimize prompt caching for multi-user scenarios
OLLAMA_NOPRUNE: "true" # disables pruning of model blobs at startup
OLLAMA_NOHISTORY: "true" # disables readline history
OLLAMA_FLASH_ATTENTION: "false" # enables the experimental flash attention feature
OLLAMA_KV_CACHE_TYPE: "f16" # see https://mitjamartini.com/blog/kv-cache-quantization-in-ollama/
OLLAMA_SCHED_SPREAD: "false" # allows scheduling models across all GPUs.
OLLAMA_NEW_ENGINE: "false" # enables the new Ollama engine
# OLLAMA_DEBUG: "true" # shows additional debug information
# OLLAMA_INTEL_GPU: "true" # enables experimental Intel GPU detection
## NVIDIA GPU Hardware Acceleration (see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html):
# NVIDIA_VISIBLE_DEVICES: "all"
# NVIDIA_DRIVER_CAPABILITIES: "compute,utility"

View File

@@ -180,16 +180,18 @@ services:
OLLAMA_NUM_PARALLEL: "1" # maximum number of parallel requests
OLLAMA_MAX_LOADED_MODELS: "1" # maximum number of loaded models per GPU
OLLAMA_LOAD_TIMEOUT: "5m" # maximum time for loading models (default "5m")
OLLAMA_KEEP_ALIVE: "10m" # duration that models stay loaded in memory (default "5m")
OLLAMA_KEEP_ALIVE: "15m" # duration that models stay loaded in memory (default "5m")
OLLAMA_CONTEXT_LENGTH: "4096" # maximum input context length
OLLAMA_MULTIUSER_CACHE: "1" # optimize prompt caching for multi-user scenarios
# OLLAMA_DEBUG: "1" # shows additional debug information
# OLLAMA_NOPRUNE: "1" # disables pruning of model blobs at startup
# OLLAMA_NOHISTORY: "1" # disables readline history
# OLLAMA_FLASH_ATTENTION: "1" # enables the experimental flash attention feature
# OLLAMA_SCHED_SPREAD: "1" # allows scheduling models across all GPUs.
# OLLAMA_GPU_OVERHEAD: "0" # reserves a portion of VRAM per GPU (bytes)
# OLLAMA_INTEL_GPU: "1" # enables experimental Intel GPU detection
OLLAMA_MULTIUSER_CACHE: "false" # optimize prompt caching for multi-user scenarios
OLLAMA_NOPRUNE: "true" # disables pruning of model blobs at startup
OLLAMA_NOHISTORY: "true" # disables readline history
OLLAMA_FLASH_ATTENTION: "false" # enables the experimental flash attention feature
OLLAMA_KV_CACHE_TYPE: "f16" # see https://mitjamartini.com/blog/kv-cache-quantization-in-ollama/
OLLAMA_SCHED_SPREAD: "false" # allows scheduling models across all GPUs.
OLLAMA_INTEL_GPU: "false" # enables experimental Intel GPU detection
OLLAMA_NEW_ENGINE: "false" # enables the new Ollama engine
# OLLAMA_DEBUG: "true" # shows additional debug information
# OLLAMA_INTEL_GPU: "true" # enables experimental Intel GPU detection
## NVIDIA GPU Hardware Acceleration (see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html):
NVIDIA_VISIBLE_DEVICES: "all"
NVIDIA_DRIVER_CAPABILITIES: "compute,utility"