Skip to content

[Bug]: Missing libsndfile.so in ARM64 Alpine Docker image #16920

@emc2314

Description

@emc2314

What happened?

libsndfile.so is missing in ghcr.io/berriai/litellm:main-dev ARM64 image. So ASR related model does not work correctly:

500: litellm.APIConnectionError: AzureException APIConnectionError - cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/soundfile.py", line 161, in <module>
    import _soundfile_data  # ImportError if this doesn't exist
    ^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_soundfile_data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/soundfile.py", line 170, in <module>
    raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library

After executing docker exec -it litellm apk add libsndfile fixes the problem.
Please add libsndfile when building arm64 alpine docker. (Note that AMD64 image works fine)

Relevant log output

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.80.0

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions