Skip to content

Commit 72d9d42

Browse files
juntaoDarumaDocker
authored andcommitted
Improve docker builds
Signed-off-by: Michael Yuan <[email protected]>
1 parent f4ba2bf commit 72d9d42

File tree

8 files changed

+67
-5
lines changed

8 files changed

+67
-5
lines changed

docker/server-vad/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ ENV LD_LIBRARY_PATH=/usr/local/lib/libtorch/lib:$LD_LIBRARY_PATH
5555
ENV LIBTORCH=/usr/local/lib/libtorch
5656

5757
COPY config.toml .
58+
COPY hello.wav .
5859

5960
RUN cat <<'EOF' > /usr/local/bin/start_servers.sh \
6061
&& chmod +x /usr/local/bin/start_servers.sh

docker/server-vad/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ The VAD server listens on port `8000` internally. Choose one of the following so
2727
## Build
2828

2929
```sh
30-
docker build -t secondstate/echokit:latest-server-vad -f docker/vad/Dockerfile .
30+
docker build \
31+
--platform linux/amd64 \
32+
--build-arg ECHOKIT_VERSION=0.1.0 \
33+
-t secondstate/echokit:latest-server-vad \
34+
.
3135
```
3236

3337
This Dockerfile always downloads the `linux-x86_64` release artifacts baked into the file. Update the URLs if you need to pin a different release.

docker/server-vad/config.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
addr = "0.0.0.0:8080"
2+
hello_wav = "hello.wav"
3+
4+
[tts]
5+
platform = "Groq"
6+
model = "playai-tts"
7+
api_key = "gsk_ABCD"
8+
voice = "Fritz-PlayAI"
9+
10+
[asr]
11+
url = "https://api.groq.com/openai/v1/audio/transcriptions"
12+
api_key = "gsk_ABCD"
13+
model = "whisper-large-v3"
14+
lang = "en"
15+
prompt = "Hello\n你好\n(noise)\n(bgm)\n(silence)\n"
16+
# Requires a local Silero VAD server: https://github.com/second-state/silero_vad_server
17+
vad_realtime_url = "ws://localhost:8000/v1/audio/realtime_vad"
18+
19+
[llm]
20+
llm_chat_url = "https://api.groq.com/openai/v1/chat/completions"
21+
api_key = "gsk_ABCD"
22+
model = "openai/gpt-oss-20b"
23+
history = 5
24+
25+
[[llm.sys_prompts]]
26+
role = "system"
27+
content = """
28+
You are a helpful assistant. Answer truthfully and concisely.
29+
"""

docker/server-vad/hello.wav

16.1 KB
Binary file not shown.

docker/server/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ RUN set -eux; \
2626
test -n "$bin_path"; \
2727
install -m 0755 "$bin_path" /usr/local/bin/echokit_server; \
2828
rm -rf "$tmpdir" /tmp/echokit_server.tar.gz
29-
COPY config.toml config.toml
29+
30+
COPY config.toml .
31+
COPY hello.wav .
3032

3133
ENV RUST_LOG=info
3234

docker/server/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Mount your `config.toml` directly into `/app/config.toml`. If you need to overri
2121
## Build
2222

2323
```sh
24-
docker build -t secondstate/echokit:latest-server -f docker/server/Dockerfile .
24+
docker build -t secondstate/echokit:latest-server .
2525
```
2626

2727
The build automatically selects the correct release artifact for your build architecture using the BuildKit-provided `TARGETPLATFORM`/`TARGETARCH` arguments. Override the downloaded release by supplying `--build-arg ECHOKIT_VERSION=<version>` (for example `0.1.1`) if you want a different tag.
@@ -33,10 +33,9 @@ Use Buildx to produce and publish a multi-arch manifest in one command. BuildKit
3333
```sh
3434
docker buildx build \
3535
--platform linux/amd64,linux/arm64 \
36-
--push \
3736
--build-arg ECHOKIT_VERSION=0.1.0 \
3837
--tag secondstate/echokit:latest-server \
39-
-f docker/server/Dockerfile .
38+
.
4039
```
4140

4241
Adjust `ECHOKIT_VERSION` as needed; omit the flag to fall back to the default version baked into the Dockerfile.

docker/server/config.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
addr = "0.0.0.0:8080"
2+
hello_wav = "hello.wav"
3+
4+
[tts]
5+
platform = "Groq"
6+
model = "playai-tts"
7+
api_key = "gsk_ABCD"
8+
voice = "Fritz-PlayAI"
9+
10+
[asr]
11+
url = "https://api.groq.com/openai/v1/audio/transcriptions"
12+
api_key = "gsk_ABCD"
13+
model = "whisper-large-v3"
14+
lang = "en"
15+
prompt = "Hello\n你好\n(noise)\n(bgm)\n(silence)\n"
16+
17+
[llm]
18+
llm_chat_url = "https://api.groq.com/openai/v1/chat/completions"
19+
api_key = "gsk_ABCD"
20+
model = "openai/gpt-oss-20b"
21+
history = 5
22+
23+
[[llm.sys_prompts]]
24+
role = "system"
25+
content = """
26+
You are a helpful assistant. Answer truthfully and concisely.
27+
"""

docker/server/hello.wav

16.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)