Sign inSign up

babanovac1980/mmaudio

By babanovac1980

•Updated over 1 year ago

Image
0

346

babanovac1980/mmaudio repository overview

⁠MMAudio - Multi-Modal Audio Generation Docker Image

This Docker image provides a production-ready, optimized implementation of the MMAudio model for generating audio from text, images, or video. It includes a FastAPI REST API and a Gradio web UI.

On the first run, the container will download the required AI models (~6GB) into the persistent volume you provide. On subsequent runs, it will detect the existing models and start instantly.

⁠Prerequisites

⁠Quick Start

Step 1: Create Local Directories

The container requires local directories on your machine to store the models and the generated audio files.

# Create a main directory for your app data
mkdir -p ./mmaudio_data

# Create subdirectories for models and output
mkdir -p ./mmaudio_data/models
mkdir -p ./mmaudio_data/output
mkdir -p ./mmaudio_data/input
mkdir -p ./mmaudio_data/uploads

Step 2: Run the Docker Container

Use the following docker run command to start the application. It will pull the image, connect your local directories, and start the services.

On the first run, please be patient. The container will download several gigabytes of models into your ./mmaudio_data/models directory. This is a one-time process.

docker run -d --gpus all --name mmaudio \
  # --- Port Mapping ---
  -p 7860:7860 \
  -p 8000:8000 \
  \
  # --- Volume Mapping ---
  -v "$(pwd)/mmaudio_data/models:/app/models" \
  -v "$(pwd)/mmaudio_data/output:/app/output" \
  -v "$(pwd)/mmaudio_data/input:/app/input" \
  -v "$(pwd)/mmaudio_data/uploads:/app/uploads" \
  \
  # --- Configuration (see below for more details) ---
  -e GRADIO_PORT=7860 \
  -e API_PORT=8000 \
  -e NVIDIA_DEVICES=all \
  \
  # --- Image Name ---
  babanovac1980/mmaudio:latest

Step 3: Access the Application

Once the container is running (which may take some time on the first launch), you can access the interfaces:

To see the logs from the container, including the download progress, run docker logs -f mmaudio.

⁠Configuration

The container is configured using environment variables. You can set them using the -e flag in your docker run command.

VariableDescriptionDefault
GRADIO_PORTPort for the Gradio Web UI.7860
API_PORTPort for the FastAPI.8000
MODELS_PATHInternal container path for models. Should be mapped to a host volume./app/models
OUTPUT_PATHInternal container path for generated audio. Should be mapped to a host volume./app/output
INPUT_PATHInternal container path for input files. Should be mapped to a host volume./app/input
UPLOADS_PATHInternal container path for file uploads. Should be mapped to a host volume./app/uploads
NVIDIA_DEVICESSpecify which NVIDIA GPUs to use. 'all' is the default. Use comma-separated device IDs like '0,1' for specific GPUs.all

Tag summary

Content type

Image

Digest

sha256:6cb63f16f…

Size

3.4 GB

Last updated

over 1 year ago

docker pull babanovac1980/mmaudio