fix(docker): add libsndfile to Alpine image for ARM64 audio processing #18092
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relevant issues
Fixes #16920
Pre-Submission checklist
tests/litellm/directory, Adding at least 1 test is a hard requirement - N/A (Dockerfile change, not testable with unit tests)make test-unitType
🐛 Bug Fix
Changes
Adds
libsndfilesystem library to the Alpine Docker image (docker/Dockerfile.alpine).The ARM64 Alpine image was missing the
libsndfilenative library, causing the Pythonsoundfilemodule to fail with:This affects users running LiteLLM on ARM64 infrastructure (Apple Silicon Macs via Docker, AWS Graviton, etc.) who need audio processing features (STT/TTS).
When you
pip install soundfile:musllibc instead ofglibc(standard)glibcdon't work onmusland vice versasoundfilemaintainers don't publish wheels formusllinux(Alpine)libsndfilesystem librarySolution
Added
apk add --no-cache libsndfileto the runtime stage ofDockerfile.alpine.This is the standard solution - the
soundfiledocumentation states: "On Linux, you need to install libsndfile using your distribution's package manager."