-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (69 loc) · 2.27 KB
/
docker-compose.yml
File metadata and controls
72 lines (69 loc) · 2.27 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
---
services:
# Fix permissions for wakeword_data and configuration volume
fix-permissions:
image: "ghcr.io/ohf-voice/linux-voice-assistant:latest"
entrypoint: []
command: "chown -R ${LVA_USER_ID:-1000}:${LVA_USER_GROUP:-1000} /app/local /app/configuration /app/wakewords/custom /app/sounds/custom"
environment:
# Pulseaudio
- XDG_RUNTIME_DIR=${LVA_XDG_RUNTIME_DIR:-/run/user/1000}
- PULSE_SERVER=${LVA_PULSE_SERVER:-/run/user/1000/pulse/native}
- PULSE_COOKIE=${LVA_PULSE_COOKIE:-/run/user/1000/pulse/cookie}
env_file: ${ENV_FILE:-.env}
group_add:
- audio
volumes:
# Wakeword data and configuration
- wakeword_data:/app/local
- wakeword_custom:/app/wakewords/custom
- configuration:/app/configuration
- sounds_custom:/app/sounds/custom
restart: "no"
# Linux Voice Assistant
linux-voice-assistant:
container_name: linux-voice-assistant
image: "ghcr.io/ohf-voice/linux-voice-assistant:latest"
restart: unless-stopped
network_mode: "host"
user: "${LVA_USER_ID:-1000}:${LVA_USER_GROUP:-1000}"
environment:
# Pulseaudio
- XDG_RUNTIME_DIR=${LVA_XDG_RUNTIME_DIR:-/run/user/1000}
- PULSE_SERVER=${LVA_PULSE_SERVER:-/run/user/1000/pulse/native}
- PULSE_COOKIE=${LVA_PULSE_COOKIE:-/run/user/1000/pulse/cookie}
env_file: ${ENV_FILE:-.env}
group_add:
- audio
# Priority for audio process
cap_add:
- SYS_NICE
volumes:
# Wakeword data and configuration
- wakeword_data:/app/local
- wakeword_custom:/app/wakewords/custom
- configuration:/app/configuration
- sounds_custom:/app/sounds/custom
# Time and zone
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
# Pulseaudio
# /run/user/1000:/run/user/1000
- ${LVA_XDG_RUNTIME_DIR:-/run/user/1000}:${LVA_XDG_RUNTIME_DIR:-/run/user/1000}
depends_on:
- fix-permissions
# Health check for process
healthcheck:
test: ["CMD", "pgrep", "-f", "linux_voice_assistant"]
interval: 30s
timeout: 5s
retries: 3
start_period: 90s
#command:
# - --additional-parameters-here
# - --but-use-env-if-possible
volumes:
wakeword_data:
wakeword_custom:
configuration:
sounds_custom: