Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/IAHispano/Applio/llms.txt

Use this file to discover all available pages before exploring further.

Applio ships with two ready-made Dockerfiles that let you run the full Gradio web UI inside an isolated container — no local Python environment required. Dockerfile is based on python:3.12-trixie and installs a CUDA-enabled PyTorch build, making it suitable for systems where the NVIDIA runtime is available via the host driver. Dockerfile_cuda is purpose-built for NVIDIA GPUs and pulls directly from the official nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04 base image, cloning Applio from GitHub at build time. Both variants install system dependencies (ffmpeg, libportaudio2), create an isolated .venv virtual environment, install PyTorch, and launch app.py bound to 0.0.0.0 so the Gradio UI is reachable from outside the container.

Prerequisites

Before you begin, make sure the following are available on your host machine:
  • Docker 20.10+docker --version
  • Docker Composedocker compose version (or the older docker-compose CLI)
  • NVIDIA Container Toolkit — required only for GPU passthrough; follow the official installation guide
  • Compatible NVIDIA drivers (CUDA 12.8+ recommended for the CUDA image)
GPU passthrough will silently fall back to CPU if the NVIDIA Container Toolkit is not installed or if driver versions are incompatible. Verify your setup with docker run --rm --gpus all nvidia/cuda:12.8.1-base-ubuntu24.04 nvidia-smi before building the Applio image.

Quick Start with docker-compose

The repository includes a docker-compose.yaml that builds from the CPU Dockerfile, exposes port 6969, and requests one NVIDIA GPU. It is the fastest way to get running:
docker-compose up -d
The full contents of the provided compose file are:
version: '1'

services:
  applio:
    build:
      context: ./
      dockerfile: Dockerfile
    ports:
      - "6969"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
The compose file exposes port 6969 but does not bind it to a specific host port. To access the UI from your browser, change "6969" to "6969:6969" in the ports section, or let Docker assign a random host port and check it with docker-compose ps.
After the container starts, open http://localhost:6969 in your browser to reach the Applio Gradio interface.

Manual Build — CPU / Generic

Use the standard Dockerfile when you do not need CUDA, or when you want a smaller, more portable image. This Dockerfile is based on python:3.12-trixie and copies your local repository into the container:
# syntax=docker/dockerfile:1
FROM python:3.12-trixie

EXPOSE 6969
WORKDIR /app

RUN apt update && \
    apt install -y -qq ffmpeg && \
    apt install -y -qq libportaudio2 && \
    apt clean && rm -rf /var/lib/apt/lists/*

COPY . .

RUN python3 -m venv /app/.venv && \
    . /app/.venv/bin/activate && \
    pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir python-ffmpeg && \
    pip install --no-cache-dir torch==2.7.1 torchvision torchaudio==2.7.1 \
        --index-url https://download.pytorch.org/whl/cu128 && \
    if [ -f "requirements.txt" ]; then pip install --no-cache-dir -r requirements.txt; fi

VOLUME ["/app/logs/"]
ENV PATH="/app/.venv/bin:$PATH"

ENTRYPOINT ["python3"]
CMD ["app.py", "--server-name", "0.0.0.0", "--port", "6969"]
Build and run it with:
1

Build the image

docker build -t applio:latest -f Dockerfile .
2

Run the container

docker run -p 6969:6969 -v $(pwd)/logs:/app/logs applio:latest
The -v flag mounts your local logs/ directory into the container so trained models and conversion outputs survive container restarts.
3

Open the UI

Navigate to http://localhost:6969 in your browser.

CUDA Build — NVIDIA GPU

Dockerfile_cuda uses nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04 as its base and clones the Applio repository from GitHub directly into the image (no local copy of the repo is needed):
FROM docker.io/nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04

ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app

RUN apt update && apt install -y \
    python3 python3-venv python3-pip git \
    libgl1 libglib2.0-0 ffmpeg libportaudio2
RUN rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/IAHispano/Applio.git .

RUN python3 -m venv .venv
RUN .venv/bin/pip install --no-cache-dir --upgrade pip
RUN .venv/bin/pip install --no-cache-dir python-ffmpeg
RUN .venv/bin/pip install --no-cache-dir torch==2.7.1 torchvision torchaudio==2.7.1 \
    --index-url https://download.pytorch.org/whl/cu128
RUN .venv/bin/pip install --no-cache-dir -r requirements.txt

EXPOSE 6969
CMD [".venv/bin/python", "app.py", "--server-name", "0.0.0.0"]
1

Build the CUDA image

docker build -t applio:cuda -f Dockerfile_cuda .
Because Dockerfile_cuda clones the repository from GitHub at build time, you do not need to run this command from within the Applio source directory. A build context with just the Dockerfile is sufficient.
2

Run with GPU passthrough

docker run --gpus all -p 6969:6969 -v $(pwd)/logs:/app/logs applio:cuda
The --gpus all flag passes all available NVIDIA GPUs into the container. Replace all with a specific GPU ID (e.g. "device=0") to restrict which GPUs are exposed.
3

Open the UI

Navigate to http://localhost:6969 in your browser.

Port Reference

PortPurpose
6969Gradio web UI (default)
Both Dockerfiles EXPOSE 6969. The CPU Dockerfile passes --port 6969 explicitly to app.py; Dockerfile_cuda omits --port and relies on the DEFAULT_PORT = 6969 defined in app.py. If you need to change the host-side port, adjust the -p flag: -p 8080:6969 maps host port 8080 to container port 6969.

Persistent Volume — /app/logs/

The CPU Dockerfile declares /app/logs/ as a Docker volume. Dockerfile_cuda does not include a VOLUME instruction, so for CUDA-based containers you must supply the mount explicitly via -v. This directory stores:
  • Trained voice model checkpoints (.pth files)
  • Feature index files (.index files)
  • Per-model training configuration (config.json)
  • Conversion and training logs
Always mount this path to a host directory or named volume when running Applio in production:
# Named volume (recommended)
docker run -p 6969:6969 -v applio_logs:/app/logs applio:latest

# Bind mount
docker run -p 6969:6969 -v /path/on/host/logs:/app/logs applio:latest
If you omit the volume mount, all trained models and logs will be lost when the container is removed. There is no way to recover them after the fact.

Environment Variables

The CPU Dockerfile sets the following environment variable to ensure the virtual environment’s binaries are found by any subprocess:
ENV PATH="/app/.venv/bin:$PATH"
No additional environment variables are required for a basic deployment. If you need to override them at runtime, pass -e VAR=value to docker run or add an environment: block to your docker-compose.yaml.

Network Access

The CMD in both Dockerfiles binds Applio to 0.0.0.0, meaning the server listens on all container network interfaces and is accessible via the mapped host port. The CPU Dockerfile splits the command across ENTRYPOINT and CMD:
ENTRYPOINT ["python3"]
CMD ["app.py", "--server-name", "0.0.0.0", "--port", "6969"]
Dockerfile_cuda uses a self-contained CMD with the venv Python and omits --port (defaulting to 6969 via app.py):
CMD [".venv/bin/python", "app.py", "--server-name", "0.0.0.0"]
When running locally and you only want the UI accessible from your own machine, override the server name at runtime: docker run -p 127.0.0.1:6969:6969 applio:latest. Connections from other hosts will be refused at the Docker level.

Build docs developers (and LLMs) love