Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
123 lines (116 loc) · 3.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
123 lines (116 loc) · 3.57 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
114
115
116
117
118
119
120
121
122
123
# localplaud — one compose file, three hardware profiles. Pick ONE per host:
#
# docker compose --profile cpu up -d --build # CPU box / cloud VM — use a cloud ASR provider
# docker compose --profile gpu up -d --build # NVIDIA host — local faster-whisper on CUDA
# docker compose --profile gpu --profile ollama up -d --build
# # NVIDIA ASR + optional local text generation
# docker compose --profile mac up -d --build # Apple Silicon — see the note below
#
# Before first start:
# cp .env.example .env # DOMAIN, ACME_EMAIL, Plaud cookie, API keys
# cp config.example.toml config.toml # pipeline / provider settings
#
# Caddy terminates HTTPS for $DOMAIN (automatic Let's Encrypt certificates)
# and proxies to whichever app service is active — they all share the network
# alias "app" on port 8080, and only one app profile runs at a time.
#
# macOS note: containers cannot reach the Metal GPU, so the `mac` profile is
# meant to run with a cloud ASR provider (set LOCALPLAUD_ASR__PROVIDER in .env).
# For on-device Metal ASR (mlx-whisper / whisper.cpp), run the app natively:
# uv run localplaud run
# and use compose only for Caddy (`docker compose --profile mac up -d caddy`,
# pointing the Caddyfile at host.docker.internal:8080 instead of app:8080).
# In-container, host services like Ollama are reachable at
# http://host.docker.internal:11434.
x-localplaud: &localplaud
env_file: .env
environment:
HF_TOKEN: ${LOCALPLAUD_DIARIZE__HF_TOKEN:-}
volumes:
- ./data:/app/data
- ./config.toml:/app/config.toml:ro
- model_cache:/home/localplaud/.cache
expose:
- "8080"
ports:
- "127.0.0.1:8081:8080"
restart: unless-stopped
networks:
default:
aliases:
- app
services:
localplaud-cpu:
<<: *localplaud
profiles: ["cpu"]
build:
context: .
dockerfile: Dockerfile
# Slim, cloud-only image: no faster-whisper/torch (pointless on a CPU box
# and very slow to build on weak ARM). Use cloud ASR/LLM/embeddings —
# set the providers + API keys in .env / config.toml.
args:
EXTRAS: "cloud"
localplaud-gpu:
<<: *localplaud
profiles: ["gpu"]
build:
context: .
dockerfile: Dockerfile.cuda
gpus: all
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
localplaud-mac:
<<: *localplaud
profiles: ["mac"]
build:
context: .
dockerfile: Dockerfile
extra_hosts:
- "host.docker.internal:host-gateway"
ollama-gpu:
image: ollama/ollama:0.31.2
profiles: ["ollama"]
environment:
OLLAMA_KEEP_ALIVE: "2m"
OLLAMA_CONTEXT_LENGTH: "8192"
volumes:
- ollama_data:/root/.ollama
expose:
- "11434"
gpus: all
restart: unless-stopped
caddy:
image: caddy:2
profiles: ["cpu", "gpu", "mac"]
ports:
- "80:80"
- "443:443"
env_file: .env
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
# Loose dependencies: only the app service of the active profile starts;
# the others are skipped (required: false).
depends_on:
localplaud-cpu:
condition: service_started
required: false
localplaud-gpu:
condition: service_started
required: false
localplaud-mac:
condition: service_started
required: false
restart: unless-stopped
volumes:
caddy_data:
caddy_config:
model_cache:
ollama_data: