-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
113 lines (109 loc) · 3.9 KB
/
Copy pathdocker-compose.yml
File metadata and controls
113 lines (109 loc) · 3.9 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# =============================================================================
# FastFlowLM-Docker: Docker Compose Configuration
# Runs FastFlowLM + Wyoming Protocol servers with AMD NPU passthrough
# =============================================================================
services:
# ── Combined ASR + LLM service (default) ────────────────────────────────
fastflowlm:
build:
context: .
dockerfile: Dockerfile
container_name: fastflowlm-docker
restart: unless-stopped
command: ["both"]
ports:
- "${WYOMING_ASR_PORT:-10300}:10300" # Wyoming ASR (Whisper)
- "${WYOMING_LLM_PORT:-10400}:10400" # Wyoming LLM (Conversation)
environment:
- FLM_ASR_ENABLED=${FLM_ASR_ENABLED:-true}
- FLM_LLM_ENABLED=${FLM_LLM_ENABLED:-true}
- FLM_LLM_MODEL=${FLM_LLM_MODEL:-llama3.2:1b}
- FLM_ASR_MODEL=${FLM_ASR_MODEL:-whisper-v3:turbo}
- FLM_SERVER_PORT=${FLM_SERVER_PORT:-52625}
- FLM_ASR_LANGUAGE=${FLM_ASR_LANGUAGE:-en}
- FLM_LLM_SYSTEM_PROMPT=${FLM_LLM_SYSTEM_PROMPT:-You are a helpful voice assistant for a smart home. Keep responses concise and conversational.}
- FLM_MODEL_PATH=/data/models
- FLM_LOG_LEVEL=${FLM_LOG_LEVEL:-INFO}
volumes:
- flm-models:/data/models
# AMD NPU device passthrough — requires XDNA driver (amdxdna.ko) on host
# After loading the driver: ls /dev/accel/ should show accel0
devices:
- /dev/accel:/dev/accel # AMD NPU accelerator devices (amdxdna)
- /dev/dri:/dev/dri # Direct Rendering Infrastructure
# Ensure container user has access to device groups
group_add:
- video
- render
# On TrueNAS Scale, also grant privileged device access
security_opt:
- seccomp:unconfined
profiles:
- default
- all
# ── ASR-only service ────────────────────────────────────────────────────
fastflowlm-asr:
build:
context: .
dockerfile: Dockerfile
container_name: fastflowlm-asr
restart: unless-stopped
command: ["asr"]
ports:
- "${WYOMING_ASR_PORT:-10300}:10300"
environment:
- FLM_ASR_ENABLED=true
- FLM_LLM_ENABLED=false
- FLM_ASR_MODEL=${FLM_ASR_MODEL:-whisper-v3:turbo}
- FLM_SERVER_PORT=${FLM_SERVER_PORT:-52625}
- FLM_ASR_LANGUAGE=${FLM_ASR_LANGUAGE:-en}
- FLM_MODEL_PATH=/data/models
- FLM_LOG_LEVEL=${FLM_LOG_LEVEL:-INFO}
volumes:
- flm-models:/data/models
devices:
- /dev/accel:/dev/accel
- /dev/dri:/dev/dri
group_add:
- video
- render
security_opt:
- seccomp:unconfined
profiles:
- asr
- all
# ── LLM-only service ────────────────────────────────────────────────────
fastflowlm-llm:
build:
context: .
dockerfile: Dockerfile
container_name: fastflowlm-llm
restart: unless-stopped
command: ["llm"]
ports:
- "${WYOMING_LLM_PORT:-10400}:10400"
environment:
- FLM_ASR_ENABLED=false
- FLM_LLM_ENABLED=true
- FLM_LLM_MODEL=${FLM_LLM_MODEL:-llama3.2:1b}
- FLM_SERVER_PORT=${FLM_SERVER_PORT:-52625}
- FLM_LLM_SYSTEM_PROMPT=${FLM_LLM_SYSTEM_PROMPT:-You are a helpful voice assistant for a smart home. Keep responses concise and conversational.}
- FLM_MODEL_PATH=/data/models
- FLM_LOG_LEVEL=${FLM_LOG_LEVEL:-INFO}
volumes:
- flm-models:/data/models
devices:
- /dev/accel:/dev/accel
- /dev/dri:/dev/dri
group_add:
- video
- render
security_opt:
- seccomp:unconfined
profiles:
- llm
- all
# Named volume for persistent model storage
volumes:
flm-models:
driver: local