-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (68 loc) · 1.82 KB
/
docker-compose.yml
File metadata and controls
70 lines (68 loc) · 1.82 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
# Only other containers can reach it at http://ollama:11434
volumes:
- "C:\\Users\\mohag\\.ollama:/root/.ollama"
environment:
- OLLAMA_KEEP_ALIVE=30m
- OLLAMA_NUM_PARALLEL=1
dns: [8.8.8.8, 1.1.1.1]
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 30s
retries: 10
start_period: 30s
restart: unless-stopped
llm-smc:
container_name: llm-smc
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "4000:4000"
env_file:
- backend/.env
environment:
- OLLAMA_URL=http://ollama:11434
- OLLAMA_MODEL=phi3:mini
- OLLAMA_FALLBACK_MODEL=llama3.2:3b-instruct-fp16
- LLM_USE_IMAGE=0
- LLM_JSON_ONLY=1
- LLM_NUM_PREDICT=32
- OLLAMA_TIMEOUT=30
- LLM_GATE_THRESHOLD=3
- PYTHONPATH=/app
working_dir: /app
command: uvicorn backend.app:app --host 0.0.0.0 --port 4000
volumes:
# Persist generated strategies to the host so you can see saved files
- ./backend/strategies_generated:/app/backend/strategies_generated
# Persist runtime data between rebuilds
- ./backend/data:/app/backend/data
healthcheck:
test:
- CMD
- python
- -c
- "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:4000/api/health', timeout=5).status==200 else 1)"
interval: 10s
timeout: 30s
retries: 10
start_period: 20s
depends_on:
ollama:
condition: service_healthy
restart: unless-stopped
frontend:
container_name: frontend
build:
context: frontend
dockerfile: Dockerfile
ports:
- "8080:80"
depends_on:
- llm-smc
restart: unless-stopped