CTranslate2 for alpine

June 4, 2026 ยท View on GitHub

This project creates Python wheels for the CTranslate2 library for Alpine Linux (musl).

This is required for running the faster-whisper project inside the Home Assistant container.

Inspired by faster-whisper-alpine project.

Notes

That's a pretty dumb thing to do, and it's much easier to use any AI projects within Debian Linux (glibc). But I released the Faster Whisper integration back in 2023. And didn't want to shelve this project just because of compatibility issues with the Home Assistant container.

It must be noted that practically none of the ASR projects work on Alpine Linux - faster-whisper (ctranslate2), sherpa-onnx, onnx-asr[cpu,hub], transformers[torch].

  • We have to use Docker for the build because GitHub only provides Ubuntu Linux in its Actions.
  • We can't use the container parameter because GitHub Actions (checkout, upload-artifact) aren't supported in the Alpine container for ARM.
  • We use the Docker outputs option to save the build result as a file.
  • We don't use QEMU/Buildx because the build process is very slow with them (40 min vs 4 min for ARM).
  • We use the matrix parameter to build wheels for amd64 and arm64.
  • We are disabling Intel MKL, which is used by the default library and is not supported in musl.
  • We are disabling OpenMP because the standard OpenBLAS was compiled without the USE_OPENMP=1 option.
  • We will enable OpenBLAS for float32 computation and Ruy for int8 computation (read more).
  • We are adding the CMAKE options recommended by @caseyng.
  • We use repairwheel to build a complete wheel without external dependencies.