Skip to content

Commit dbc9a8d

Browse files
committed
Added param for keeping ollama models loaded
1 parent 9aa9315 commit dbc9a8d

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ CLIMATECLAW_CACHE_PATH=/scratch/b/b380001/climateclaw/cache # The path where th
1111

1212
CLIMATECLAW_OPENAI_API_KEY="YOUR_OPENAI_API_KEY" # The OpenAI API key to use for the OpenAI API
1313
CLIMATECLAW_LITE_LLM_ADDRESS="http://haproxy:4000" # The address of the LiteLLM Proxy
14+
CLIMATECLAW_OLLAMA_KEEP_ALIVE=-1 # Keep Ollama models loaded after use. -1 = indefinitely, subject to available GPU/RAM.
15+
1416
# IMPORTANT: On local dev, --scale flag is not used (See ./dev.sh), the litellm address as well as MCP server URLs below
1517
# should be given as their service names in docker-compose.dev.yml, e.g. "http://litellm:4000", "http://code-server:8050".
1618

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ services:
109109
hostname: ollama-${CLIMATECLAW_INSTANCE_NAME}
110110
volumes:
111111
- /container/da/climateclaw-ollama-models/.ollama:/root/.ollama
112+
environment:
113+
OLLAMA_KEEP_ALIVE: ${CLIMATECLAW_OLLAMA_KEEP_ALIVE:--1}
112114
networks:
113115
- climateclaw
114116
devices:

0 commit comments

Comments
 (0)