-
Notifications
You must be signed in to change notification settings - Fork 153
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (92 loc) · 2.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (92 loc) · 2.58 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
services:
ollama:
image: ollama/ollama:latest
container_name: fireform-ollama
ports:
- "127.0.0.1:11434:11434"
volumes:
- ollama_data:/root/.ollama
networks:
- fireform-network
healthcheck:
test: ["CMD-SHELL", "ollama list || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
whisper:
# Multi-arch (arm64 + amd64) Whisper ASR service — runs natively on Apple
# Silicon. Uses the faster-whisper (CTranslate2) engine and bundles ffmpeg,
# so it accepts any audio the browser produces. Model is pulled from
# Hugging Face on first request into the whisper_models volume.
image: onerahmet/openai-whisper-asr-webservice:latest
container_name: fireform-whisper
environment:
- ASR_ENGINE=faster_whisper
- ASR_MODEL=small.en
- ASR_MODEL_PATH=/data/whisper
volumes:
- whisper_models:/data/whisper
ports:
- "127.0.0.1:9000:9000"
networks:
- fireform-network
healthcheck:
test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:9000/docs')\" || exit 1"]
interval: 15s
timeout: 5s
retries: 5
start_period: 60s
app:
build:
context: .
dockerfile: Dockerfile
container_name: fireform-app
depends_on:
ollama:
condition: service_healthy
whisper:
condition: service_started
command: /bin/sh -c "python3 -m api.db.init_db && python3 -m uvicorn api.main:app --host 0.0.0.0 --port 8000"
volumes:
- .:/app
# Persist the SQLite DB (~/.fireform) across container rebuilds so created
# templates aren't wiped each time the image is recreated.
- fireform_db:/root/.fireform
ports:
- "8000:8000"
environment:
- PYTHONUNBUFFERED=1
- CUDA_VISIBLE_DEVICES=""
# Fix #118 #116 — correct PYTHONPATH to project root
- PYTHONPATH=/app
- OLLAMA_HOST=http://ollama:11434
- OLLAMA_TIMEOUT=300
- OLLAMA_MODEL=qwen2.5:1.5b
- WHISPER_HOST=http://whisper:9000
networks:
- fireform-network
frontend:
image: python:3.11-slim
container_name: fireform-frontend
working_dir: /app
command: python3 -m http.server 5173 --directory frontend
volumes:
- .:/app
ports:
- "5173:5173"
depends_on:
app:
condition: service_started
networks:
- fireform-network
volumes:
ollama_data:
driver: local
whisper_models:
driver: local
fireform_db:
driver: local
networks:
fireform-network:
driver: bridge