-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathdocker-compose.piper-example.yml
42 lines (41 loc) · 1.57 KB
/
docker-compose.piper-example.yml
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
services:
piper:
image: lscr.io/linuxserver/piper:latest
container_name: piper
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- PIPER_VOICE=en_US-hfc_male-medium
- PIPER_LENGTH=1.0 # optional
- PIPER_NOISE=0.667 # optional
- PIPER_NOISEW=0.333 # optional
- PIPER_SPEAKER=0 # optional
- PIPER_PROCS=1 # optional
volumes:
# - /path/to/piper/data:/config # Optional volume for Piper config
- ./piper_models:/usr/share/piper_models # Volume for Piper models, find models at https://github.com/rhasspy/piper/
ports:
- 10200:10200
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'nc -z localhost 10200']
interval: 10s
timeout: 5s
retries: 5
epub_to_audiobook:
build:
context: ./ # Directory containing the Dockerfile for epub_to_audiobook
dockerfile: Dockerfile # Name of the Dockerfile (if it's not the default 'Dockerfile')
container_name: epub_to_audiobook
environment:
- PIPER_HOST=piper
- PIPER_PORT=10200
volumes:
- ./:/app
- <path/to/epub/dir/on/host>:/epub_src # Map the top level epub directory on the host machine
# command: tail -f /dev/null # Uncomment this line to keep the container running, and run via connecting to it with `docker exec -it epub_to_audiobook /bin/bash`
command: "python main.py --tts piper_docker --no_prompt '/epub_src/<path/to/epub/file>' audiobook_output" # Run command directly when the containers start up
depends_on:
piper:
condition: service_healthy