Developers · Run it yourself

Run Mirli in Docker

Run the server and web UI in a container, with or without an NVIDIA GPU.

This guide runs the Mirli server and web UI in a container, without the desktop app, on a home server, a NAS or a GPU machine. The image already contains the audio.cpp runtime.

Warning

The server has no login unless you set a token. These steps publish the port on 127.0.0.1 only. To reach it from other machines, follow Reach Mirli from another machine first.

Before you begin

  • Install Docker with Compose.
  • Get docker-compose.yml from the repository, or clone the repository.
  • For an NVIDIA GPU, install the NVIDIA Container Toolkit on the host.

Prebuilt images are amd64 only. On arm64, follow Build the image yourself.

Start the container

  1. In the folder with docker-compose.yml, start Mirli:

    Terminal
    docker compose up -d

    Compose pulls ghcr.io/hamsanders/soundbox:latest and starts it.

  2. Open http://localhost:17494.

  3. Download a model from the Models page, or from the command line:

    Terminal
    docker compose exec soundbox soundbox pull audiocpp-stable-audio-3-sfx

The container keeps its data in two volumes, described in the Docker image reference.

Start the container with an NVIDIA GPU

  1. Check that a container can see your GPU:

    Terminal
    docker run --rm --gpus all ubuntu nvidia-smi

    The output lists your GPU.

  2. Start Mirli with the CUDA override file:

    Terminal
    docker compose -f docker-compose.yml -f docker-compose.cuda.yml up -d

    Compose pulls ghcr.io/hamsanders/soundbox:cuda.

For AMD and Intel GPUs, build a Vulkan image; see the build arguments.

Run without Compose

To start the CPU image with docker run:

Terminal
docker run -d --name soundbox -p 127.0.0.1:17494:17494 \
  -v soundbox-data:/data -v soundbox-models:/data/models \
  ghcr.io/hamsanders/soundbox:latest

For the CUDA image, add --gpus all after -d and use the :cuda tag.

Build the image yourself

To run your own changes, or on arm64, build from a clone of the repository:

Terminal
docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build

Run without local models

For a machine that generates only through custom endpoints, build the slim image. It has no audio.cpp, needs no GPU and is a fraction of the size:

Terminal
docker build -f Dockerfile.slim -t mirli-slim .
docker run -d -p 127.0.0.1:17494:17494 -v mirli-data:/data mirli-slim

The Models page then offers no models to download.

What's next