Conversation
|
Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details? |
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
📝 WalkthroughWalkthroughThe TTS Dockerfile adds a Piper voice revision build argument, pins voice model downloads to that revision, and hardens FFmpeg and Piper downloads with stricter shell failure handling and curl retries. ChangesTTS Docker build
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Web/Resgrid.Web.Tts/Dockerfile`:
- Around line 25-42: Align the FFmpeg installation destination in the
Dockerfile’s download/install RUN block with the Kubernetes deployment’s
expected /usr/bin/ffmpeg path. Update the cp target from /usr/local/bin/ffmpeg,
or consistently adjust the deployment configuration to use the installed path,
ensuring the TTS service resolves the binary in Kubernetes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 59616282-f564-4d1d-8deb-4cf5a23ae09d
📒 Files selected for processing (1)
Web/Resgrid.Web.Tts/Dockerfile
| ARG PIPER_VOICES_REVISION=e21c7de8d4eab79b902f0d61e662b3f21664b8d2 | ||
| COPY --from=base /etc/passwd /tmp/base-passwd | ||
| COPY --from=base /etc/group /tmp/base-group | ||
| RUN apt-get update \ | ||
| RUN set -eu; \ | ||
| apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| libespeak-ng1 \ | ||
| ca-certificates \ | ||
| curl \ | ||
| xz-utils \ | ||
| gzip \ | ||
| passwd \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && curl -fsSL --retry 3 --retry-delay 5 "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" -o /tmp/ffmpeg.tar.xz \ | ||
| && curl -fsSL "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz.md5" -o /tmp/ffmpeg.tar.xz.md5 \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN set -eu; \ | ||
| echo "Downloading FFmpeg" \ | ||
| && curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" -o /tmp/ffmpeg.tar.xz \ | ||
| && curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz.md5" -o /tmp/ffmpeg.tar.xz.md5 \ |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Ensure the FFmpeg installation path aligns with the Kubernetes configuration.
The Dockerfile installs the static FFmpeg binary to /usr/local/bin/ffmpeg (line 49). However, the downstream Kubernetes deployment configuration explicitly expects it at /usr/bin/ffmpeg.
If the base image does not already provide a system-level FFmpeg symlink or binary at /usr/bin/ffmpeg, the TTS service will fail when attempting to process audio in Kubernetes. Please verify this behavior and consider either updating the cp destination here to /usr/bin/ffmpeg or modifying the deployment YAML to match /usr/local/bin/ffmpeg.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Web/Resgrid.Web.Tts/Dockerfile` around lines 25 - 42, Align the FFmpeg
installation destination in the Dockerfile’s download/install RUN block with the
Kubernetes deployment’s expected /usr/bin/ffmpeg path. Update the cp target from
/usr/local/bin/ffmpeg, or consistently adjust the deployment configuration to
use the installed path, ensuring the TTS service resolves the binary in
Kubernetes.
Summary
This PR fixes the Docker build process for the Resgrid TTS (Text-to-Speech) web service by improving build reliability, error handling, and reproducibility.
Key Changes
Pinned Piper voices repository revision: Added a new build argument
PIPER_VOICES_REVISIONthat locks the Hugging Face Piper voices download to a specific git commit, ensuring reproducible builds instead of always pulling from themainbranch (which could introduce breaking changes).Improved error handling: Split the single large
RUNcommand into multiple separateRUNsteps, each usingset -euto ensure the build fails immediately on any error or unset variable, rather than silently continuing.Enhanced download reliability: Increased curl retry attempts from 3 to 5 and added the
--retry-all-errorsflag so that all types of download errors (not just transient ones) are retried.Better build logging: Added
echostatements to provide visibility into download progress (FFmpeg, Piper binary, and individual Piper voice files) during the Docker build.