Skip to content

Commit 9a99267

Browse files
committed
Add docker compose and instructions
1 parent 464f4bb commit 9a99267

File tree

5 files changed

+129
-2
lines changed

5 files changed

+129
-2
lines changed

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,51 @@ docker run -it -p 10300:10300 -v /path/to/local/data:/data rhasspy/wyoming-whisp
1818
``` sh
1919
docker run -it -p 10200:10200 -v /path/to/local/data:/data rhasspy/wyoming-piper --voice en_US-lessac-medium
2020
```
21+
22+
## To run in standalone server
23+
24+
### Run without GPU
25+
26+
Build openwakeword, piper and whisper without GPU with:
27+
28+
``` sh
29+
docker compose -f docker-compose.base.yml build --no-cache
30+
```
31+
32+
Run it with:
33+
34+
``` sh
35+
docker composer -f docker-compose.base.yml up -d
36+
```
37+
38+
Take it down with:
39+
40+
``` sh
41+
docker composer down
42+
```
43+
44+
### Run with GPU
45+
46+
Build openwakeword, piper and whisper with GPU with:
47+
48+
``` sh
49+
docker compose -f docker-compose.gpu.yml build --no-cache
50+
```
51+
52+
Run it with:
53+
54+
``` sh
55+
docker composer -f docker-compose.gpu.yml up -d
56+
```
57+
58+
Take it down with:
59+
60+
``` sh
61+
docker composer down
62+
```
63+
64+
### Extend it
65+
66+
You can extend those files adding your own languages.
67+
More on docker compose extend in the [official documentation](https://docs.docker.com/compose/multiple-compose-files/extends/).
68+

docker-compose.base.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: '3'
2+
services:
3+
wyoming-piper:
4+
build:
5+
context: ./piper/
6+
dockerfile: NONGPU.Dockerfile
7+
ports:
8+
- "10200:10200"
9+
volumes:
10+
- ./piper-data:/data
11+
command: [ "--voice", "en_US-lessac-medium" ]
12+
restart: unless-stopped
13+
14+
wyoming-whisper:
15+
build:
16+
context: ./whisper/
17+
dockerfile: NONGPU.Dockerfile
18+
ports:
19+
- "10300:10300"
20+
volumes:
21+
- ./whisper-data:/data
22+
command: [ "--model", "tiny-int8", "--language", "en" ]
23+
restart: unless-stopped
24+
25+
wyoming-openwakeword:
26+
build:
27+
context: ./openwakeword/
28+
dockerfile: NONGPU.Dockerfile
29+
ports:
30+
- "10400:10400"
31+
volumes:
32+
- ./openwakeword-data:/data
33+
command: [ "--model", "hey_jarvis" ]
34+
restart: unless-stopped
35+

docker-compose.gpu.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: '3'
2+
services:
3+
wyoming-piper:
4+
extends:
5+
file: docker-compose.base.yml
6+
service: wyoming-piper
7+
build:
8+
dockerfile: GPU.Dockerfile
9+
deploy:
10+
resources:
11+
reservations:
12+
devices:
13+
- driver: nvidia
14+
count: 1
15+
capabilities: [gpu]
16+
17+
wyoming-whisper:
18+
extends:
19+
file: docker-compose.base.yml
20+
service: wyoming-whisper
21+
build:
22+
dockerfile: GPU.Dockerfile
23+
deploy:
24+
resources:
25+
reservations:
26+
devices:
27+
- driver: nvidia
28+
count: 1
29+
capabilities: [gpu]
30+
31+
wyoming-openwakeword:
32+
extends:
33+
file: docker-compose.base.yml
34+
service: wyoming-openwakeword
35+
build:
36+
dockerfile: GPU.Dockerfile
37+
deploy:
38+
resources:
39+
reservations:
40+
devices:
41+
- driver: nvidia
42+
count: 1
43+
capabilities: [gpu]
44+

piper/GPU.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ COPY run-gpu.sh ./
3232

3333
EXPOSE 10200
3434

35-
ENTRYPOINT ["bash", "/run.sh"]
35+
ENTRYPOINT ["bash", "/run-gpu.sh"]

piper/NONGPU.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ COPY run-nongpu.sh ./
3131

3232
EXPOSE 10200
3333

34-
ENTRYPOINT ["bash", "/run.sh"]
34+
ENTRYPOINT ["bash", "/run-nongpu.sh"]

0 commit comments

Comments
 (0)