Skip to main content
Fish Audio provides Docker images for both WebUI and API server deployments. You can use pre-built images from Docker Hub or build custom images locally.

Prerequisites

Before deploying with Docker, ensure you have:
  • Docker and Docker Compose installed
  • NVIDIA Docker runtime (for GPU support)
  • At least 12GB GPU memory for CUDA inference
  • Downloaded model weights (see Running Inference)

Pre-built Images

Fish Audio provides ready-to-use Docker images on Docker Hub:
For production use, we recommend using specific version tags instead of latest to ensure consistency across deployments.

Quick Start with Docker Run

The fastest way to get started is using docker run:

WebUI Deployment

Access the WebUI at http://localhost:7860

API Server Deployment

Access the API documentation at http://localhost:8080
Enable the COMPILE=1 environment variable for ~10x faster inference on CUDA deployments. This uses torch.compile to optimize the model.

Docker Compose Deployment

For development or customization, Docker Compose provides easier configuration management:

Setup

Start Services

Run containers in detached mode by adding the -d flag: docker compose --profile webui up -d

Environment Variables

Customize deployment using environment variables or a .env file:

Manual Docker Build

For advanced users who need custom configurations:

Build WebUI Image

Build API Server Image

Build Development Image

Build Arguments

Volume Mounts

Both Docker run and Compose methods require these volume mounts:
Ensure model weights are downloaded and placed in the ./checkpoints directory before starting containers. See Running Inference for download instructions.

Environment Variables Reference

WebUI Configuration

API Server Configuration

Model Configuration

Performance Optimization

Container Management

View Logs

Stop Containers

Update Images

GPU Support

Prerequisites

Install NVIDIA Container Toolkit:

Verify GPU Access

GPU support requires NVIDIA Docker runtime. For CPU-only deployment, remove the --gpus all flag and use CPU images.

Troubleshooting

Container Won’t Start

Check logs for errors:
Common issues:
  • Missing model weights in ./checkpoints
  • Port already in use (change port mapping)
  • Insufficient GPU memory

GPU Not Detected

Verify NVIDIA Docker runtime is installed:

Performance Issues

  1. Enable compile optimization: COMPILE=1
  2. Ensure GPU is being used (check with nvidia-smi)
  3. Verify sufficient GPU memory is available

Next Steps