-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.ollama.yml
More file actions
42 lines (38 loc) · 919 Bytes
/
Copy pathdocker-compose.ollama.yml
File metadata and controls
42 lines (38 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
services:
ollama:
image: ollama/ollama:latest
restart: unless-stopped
volumes:
- ollama_models:/root/.ollama
ports:
- "11434:11434"
healthcheck:
test: ["CMD","ollama","list"]
interval: 10s
timeout: 5s
retries: 12
start_period: 20s
ollama-init:
image: ollama/ollama:latest
depends_on:
ollama:
condition: service_healthy
environment:
OLLAMA_HOST: http://ollama:11434
OLLAMA_MODEL: ${OLLAMA_MODEL:-qwen3:4b}
entrypoint: ["/bin/sh","-c"]
command: ["ollama pull \"$${OLLAMA_MODEL}\""]
restart: "no"
api:
environment:
LLM_PROVIDER: ollama
OLLAMA_BASE_URL: http://ollama:11434
depends_on:
ollama-init:
condition: service_completed_successfully
streamlit:
environment:
LLM_PROVIDER: ollama
OLLAMA_BASE_URL: http://ollama:11434
volumes:
ollama_models: