Complete web interface for Meta's AudioCraft AI audio generation: - Gradio UI with tabs for all 5 model families (MusicGen, AudioGen, MAGNeT, MusicGen Style, JASCO) - REST API with FastAPI, OpenAPI docs, and API key auth - VRAM management with ComfyUI coexistence support - SQLite database for project/generation history - Batch processing queue for async generation - Docker deployment optimized for RunPod with RTX 4090 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
# Docker Compose for local development and testing
|
|
# For RunPod deployment, use the Dockerfile directly
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
audiocraft:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: audiocraft-studio
|
|
ports:
|
|
- "7860:7860" # Gradio UI
|
|
- "8000:8000" # REST API
|
|
volumes:
|
|
# Persistent storage
|
|
- audiocraft-outputs:/workspace/outputs
|
|
- audiocraft-data:/workspace/data
|
|
- audiocraft-models:/workspace/models
|
|
# Development: mount source code
|
|
- ./src:/workspace/app/src:ro
|
|
- ./config:/workspace/app/config:ro
|
|
environment:
|
|
- AUDIOCRAFT_HOST=0.0.0.0
|
|
- AUDIOCRAFT_GRADIO_PORT=7860
|
|
- AUDIOCRAFT_API_PORT=8000
|
|
- AUDIOCRAFT_DEBUG=false
|
|
- AUDIOCRAFT_COMFYUI_RESERVE_GB=0 # No ComfyUI in this compose
|
|
- NVIDIA_VISIBLE_DEVICES=all
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:7860/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
|
|
# Optional: Run alongside ComfyUI
|
|
# comfyui:
|
|
# image: your-comfyui-image
|
|
# container_name: comfyui
|
|
# ports:
|
|
# - "8188:8188"
|
|
# volumes:
|
|
# - comfyui-data:/workspace
|
|
# deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# count: 1
|
|
# capabilities: [gpu]
|
|
|
|
volumes:
|
|
audiocraft-outputs:
|
|
audiocraft-data:
|
|
audiocraft-models:
|