From ae2178285910cf6ebaa5443daaf42c8f5545bed3 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 27 Aug 2026 12:13:55 +0200 Subject: [PATCH 1/2] speech_to_phrase: Shut down cleanly on stop (#4800) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * speech_to_phrase: Shut down cleanly on stop speech-to-phrase has no SIGTERM handler, so s6's default SIGTERM kills the process and the container exits with code 143, which newer Supervisor versions flag as an unclean shutdown. It does catch KeyboardInterrupt and exit 0 on SIGINT, so tell s6 to stop the service with SIGINT via the down-signal file. Verified with the full s6 init: docker stop completes in ~3s, the service log shows a clean stop, and the container exits with code 0. Co-Authored-By: Claude Fable 5 * speech_to_phrase: Probe readiness every 5s during startup With the default 30s healthcheck interval the app can sit in the "Starting" state for half a minute after it is already serving. Use --start-interval=5s so readiness is detected within seconds once training completes and the Wyoming port opens. Verified: container reports healthy 8s after start (including forced training), down from up to ~40s. Co-Authored-By: Claude Fable 5 --------- Co-authored-by: Claude Fable 5 Co-authored-by: Jan Čermák --- speech_to_phrase/CHANGELOG.md | 6 ++++++ speech_to_phrase/Dockerfile | 2 +- speech_to_phrase/config.yaml | 2 +- .../etc/s6-overlay/s6-rc.d/speech-to-phrase/down-signal | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 speech_to_phrase/rootfs/etc/s6-overlay/s6-rc.d/speech-to-phrase/down-signal diff --git a/speech_to_phrase/CHANGELOG.md b/speech_to_phrase/CHANGELOG.md index 4e1aec6f6..50efb1f1d 100644 --- a/speech_to_phrase/CHANGELOG.md +++ b/speech_to_phrase/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.4.5 + +- Shut down cleanly when the app is stopped +- Leave the "Starting" state faster by checking readiness every 5 seconds + during startup + ## 1.4.4 - Upgrade base image to trixie diff --git a/speech_to_phrase/Dockerfile b/speech_to_phrase/Dockerfile index 522646eed..33a729be1 100644 --- a/speech_to_phrase/Dockerfile +++ b/speech_to_phrase/Dockerfile @@ -46,7 +46,7 @@ ENV ORT_DISABLE_TELEMETRY=1 WORKDIR / COPY rootfs / -HEALTHCHECK --start-period=10m \ +HEALTHCHECK --start-period=10m --start-interval=5s --interval=30s \ CMD echo '{ "type": "describe" }' \ | nc -w 1 localhost 10300 \ | grep -iq "speech-to-phrase" \ diff --git a/speech_to_phrase/config.yaml b/speech_to_phrase/config.yaml index 8a04ffa03..551055f9d 100644 --- a/speech_to_phrase/config.yaml +++ b/speech_to_phrase/config.yaml @@ -1,5 +1,5 @@ --- -version: 1.4.4 +version: 1.4.5 slug: speech-to-phrase name: Speech-to-Phrase description: Fast and personalized local speech-to-text diff --git a/speech_to_phrase/rootfs/etc/s6-overlay/s6-rc.d/speech-to-phrase/down-signal b/speech_to_phrase/rootfs/etc/s6-overlay/s6-rc.d/speech-to-phrase/down-signal new file mode 100644 index 000000000..d751378e1 --- /dev/null +++ b/speech_to_phrase/rootfs/etc/s6-overlay/s6-rc.d/speech-to-phrase/down-signal @@ -0,0 +1 @@ +SIGINT From f0aaea6015fa8e3b63a8612fdd3d5bfc7a19bb3a Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 27 Aug 2026 12:14:09 +0200 Subject: [PATCH 2/2] whisper: Shut down cleanly on stop (#4801) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * whisper: Shut down cleanly on stop wyoming-faster-whisper has no SIGTERM handler, so s6's default SIGTERM kills the process and the container exits with code 143, which newer Supervisor versions flag as an unclean shutdown. It does catch KeyboardInterrupt and exit 0 on SIGINT, so tell s6 to stop the service with SIGINT via the down-signal file. Same fix as speech_to_phrase; mechanism verified there with the full s6 init (docker stop ~3s, container exit code 0). Co-Authored-By: Claude Fable 5 * whisper: Probe readiness every 5s during startup With the default 30s healthcheck interval the app can sit in the "Starting" state for half a minute after it is already serving. Use --start-interval=5s so readiness is detected within seconds once the model is loaded and the Wyoming port opens. Co-Authored-By: Claude Fable 5 --------- Co-authored-by: Claude Fable 5 Co-authored-by: Jan Čermák --- whisper/CHANGELOG.md | 6 ++++++ whisper/Dockerfile | 2 +- whisper/config.yaml | 2 +- whisper/rootfs/etc/s6-overlay/s6-rc.d/whisper/down-signal | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 whisper/rootfs/etc/s6-overlay/s6-rc.d/whisper/down-signal diff --git a/whisper/CHANGELOG.md b/whisper/CHANGELOG.md index c2182f0a8..0b948382e 100644 --- a/whisper/CHANGELOG.md +++ b/whisper/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 3.5.3 + +- Shut down cleanly when the app is stopped +- Leave the "Starting" state faster by checking readiness every 5 seconds + during startup + ## 3.5.2 - Update speech recognition components to their latest versions diff --git a/whisper/Dockerfile b/whisper/Dockerfile index 7ed3a0f85..aa41ebcb4 100644 --- a/whisper/Dockerfile +++ b/whisper/Dockerfile @@ -57,7 +57,7 @@ ENV ORT_DISABLE_TELEMETRY=1 WORKDIR / COPY rootfs / -HEALTHCHECK --start-period=10m \ +HEALTHCHECK --start-period=10m --start-interval=5s --interval=30s \ CMD echo '{ "type": "describe" }' \ | nc -w 1 localhost 10300 \ | grep -q "faster-whisper" \ diff --git a/whisper/config.yaml b/whisper/config.yaml index 2cf0c9229..54647e4a6 100644 --- a/whisper/config.yaml +++ b/whisper/config.yaml @@ -1,5 +1,5 @@ --- -version: 3.5.2 +version: 3.5.3 slug: whisper name: Whisper description: Speech-to-text with Whisper diff --git a/whisper/rootfs/etc/s6-overlay/s6-rc.d/whisper/down-signal b/whisper/rootfs/etc/s6-overlay/s6-rc.d/whisper/down-signal new file mode 100644 index 000000000..d751378e1 --- /dev/null +++ b/whisper/rootfs/etc/s6-overlay/s6-rc.d/whisper/down-signal @@ -0,0 +1 @@ +SIGINT