Skip to content

Docker support #1

Closed
Closed

Description

@easyjoh

Any change for docker support.

I like to run all of these services from docker. I use a DGX Spark which has arm processor, so would hope you support that. Lllama.cpp runs great on DGX Spark.

Project here look nice. Currently I mix a Danish "hviske" for STT and Omnivoice for TTS, but am looking for more streamlined approach.

Activity

  1. added
    enhancement
    on Jun 26, 2026
  2. 0xShug0 commented on Jun 26, 2026

    @0xShug0
    Owner

    Docker usage will be added. Note that current server in release-0.1 is POC. We will update the server and release the new notes. The instructions below are just for the release-0.1 server.

    Running audiocpp_server in Docker

    This runbook runs the current audiocpp_server binary inside a CUDA
    Docker runtime image. The repository is mounted read-only into the container, so
    the server uses the exact local build/ binary and local model assets.

    The commands below assume your normal CMake/CUDA build environment is already
    active and Docker is configured with NVIDIA Container Toolkit.

    0. Verify Docker GPU Access

    Check Docker GPU access before building or starting the server:

    docker run --rm --gpus all nvidia/cuda:12.9.0-runtime-ubuntu24.04 nvidia-smi

    If this fails with could not select device driver "" with capabilities: [[gpu]], Docker is not configured with the NVIDIA container runtime yet.
    Configure NVIDIA Container Toolkit first, then rerun the same command.

    1. Build the Server

    Use the same CUDA build tree as the README:

    cmake \
      -S . \
      -B build \
      -DENGINE_ENABLE_CUDA=ON
    
    cmake \
      --build build \
      --parallel "$(nproc)" \
      --target audiocpp_server

    The server binary should exist at:

    build/bin/audiocpp_server

    2. Create a Smoke-Test Config

    This config uses the checked-in Silero VAD asset so the server can be tested
    without downloading a large model:

    mkdir -p build/docker-server-smoke
    
    cat > build/docker-server-smoke/server.json <<'JSON'
    {
      "host": "0.0.0.0",
      "port": 8080,
      "device": 0,
      "threads": 1,
      "models": [
        {
          "id": "silero-vad",
          "family": "silero_vad",
          "path": "/workspace/assets/framework/models/silero_vad",
          "task": "vad",
          "mode": "offline"
        }
      ]
    }
    JSON

    host must be 0.0.0.0 inside Docker. Binding to 127.0.0.1 would make the
    server listen only inside the container.

    3. Build the Runtime Image

    Build the small runtime image from stdin. This sends only the Dockerfile text to
    Docker, not the repository, build/, or model directories:

    docker build -t audiocpp-server-runtime:cuda12.9 - <<'DOCKERFILE'
    FROM nvidia/cuda:12.9.0-runtime-ubuntu24.04
    RUN apt-get update && apt-get install -y --no-install-recommends \
        ca-certificates curl libgomp1 libvulkan1 \
     && rm -rf /var/lib/apt/lists/*
    WORKDIR /workspace
    ENTRYPOINT ["/workspace/build/bin/audiocpp_server"]
    DOCKERFILE

    4. Start the Server

    Start the server with the standard NVIDIA Docker runtime path:

    docker rm -f audiocpp-server-smoke >/dev/null 2>&1 || true
    
    docker run -d --name audiocpp-server-smoke \
      --gpus all \
      -p 18080:8080 \
      -v "$PWD:/workspace:ro" \
      -w /workspace \
      audiocpp-server-runtime:cuda12.9 \
      --config /workspace/build/docker-server-smoke/server.json

    Do not replace --gpus all with manual driver-library mounts in normal usage.

    5. Wait for Health

    The first request can arrive before model loading finishes, so use a retry loop:

    for i in $(seq 1 30); do
      if curl -fsS http://127.0.0.1:18080/health; then
        echo
        exit 0
      fi
      sleep 1
    done
    
    echo "server did not become healthy" >&2
    docker logs audiocpp-server-smoke >&2
    exit 1

    Expected response:

    {"status":"ok","backend":"cuda","models":1}

    6. Verify the Registered Model

    curl -fsS http://127.0.0.1:18080/v1/models

    Expected response:

    {"object":"list","data":[{"id":"silero-vad","object":"model","owned_by":"engine","family":"silero_vad","task":"vad","mode":"offline"}]}

    7. Run a Real Task Request

    curl -fsS http://127.0.0.1:18080/v1/tasks/run \
      -H 'Content-Type: application/json' \
      -d '{"model":"silero-vad","request":{"audio":"/workspace/assets/resources/sample_16k.wav"}}'

    Expected response shape:

    {"segments":[{"start_sample":6688,"end_sample":33760,"confidence":1},{"start_sample":47136,"end_sample":81376,"confidence":1},{"start_sample":94240,"end_sample":156640,"confidence":1},{"start_sample":170528,"end_sample":222176,"confidence":1}]}

    This is the validated response for the checked-in assets/resources/sample_16k.wav
    smoke input.

    8. Stop the Smoke Server

    docker rm -f audiocpp-server-smoke

    Using Other Models

    For larger models, keep the same Docker image and server command, but change
    build/docker-server-smoke/server.json to point at the model path as it appears
    inside the container. For example, if the repo-local models/ directory is
    mounted through /workspace, use paths like:

    "path": "/workspace/models/Qwen3-ASR-0.6B"

    If models live outside the repo, mount them explicitly and use that container
    path in server.json, for example:

    -v /absolute/host/models:/models:ro
    "path": "/models/Qwen3-ASR-0.6B"
  3. easyjoh commented on Jun 27, 2026

    @easyjoh
    Author

    @0xShug0, on DGX Spark I normally run llama.cpp with cuda 13. Any troubles for audio.cpp for cuda 13 support?

  4. 0xShug0 commented on Jun 27, 2026

    @0xShug0
    Owner

    @easyjoh audio.cpp uses ggml’s CUDA backend, so CUDA 13 should be in the same general compatibility area as recent llama.cpp/ggml CUDA builds.

  5. added a commit that references this issue on Sep 21, 2026
  6. added a commit that references this issue on Oct 15, 2026
  7. added a commit that references this issue on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions