Skip to content

Latest commit

 

History

History
70 lines (42 loc) · 1.76 KB

File metadata and controls

70 lines (42 loc) · 1.76 KB

Running audio.cpp in Docker

Prerequisites

Images

The following image flavors are available for this project:

  • full: This image provides the main tools cli and server and test binaries in one image. When running the container, the first argument selects the tool to execute.

Build the Image

CUDA

Build with the default CUDA 12.x version. See .devops/cuda.Dockerfile.

docker build -f .devops/cuda.Dockerfile -t local/audiocpp:full-cuda .

Build with a specific CUDA version, for example 13.2.0:

docker build -f .devops/cuda.Dockerfile -t local/audiocpp:full-cuda --build-arg CUDA_VERSION=13.2.0 .

CPU

docker build -f .devops/cpu.Dockerfile -t local/audiocpp:full-cpu .

Usage

The model directory <models-dir> must be mounted into the container. An additional <output-dir> should be mounted for TTS tasks.

CUDA

docker run --rm --gpus all -v "<models-dir>:/models:ro" local/audiocpp:full-cuda <cli|server> <...>

CPU

docker run --rm -v "<models-dir>:/models:ro" local/audiocpp:full-cpu <cli|server> <...>

See the fully working examples below.

Examples

Examples for Docker, including CUDA and CPU, are available in examples/docker.

PocketTTS via Docker Run

Generate speech through the audio.cpp CLI running in Docker.

See EXAMPLE.md in examples/docker/cli.

PocketTTS via Docker Compose

Generate speech through the audio.cpp server running in Docker Compose.

See EXAMPLE.md in examples/docker/server.