Run This Ai
EN DE

How to Separate Music Stems with Spleeter (Docker Quick Start)

Step-by-step guide to running Spleeter via Docker — isolate vocals, drums, bass, and other instruments from any audio file.

Spleeter Logo

Getting Started with Spleeter on Docker

Spleeter by Deezer makes AI-powered music source separation accessible to anyone with a Docker environment. In this quick start guide, you will learn how to pull the official image, run separation on your audio files, and get clean stems — all from the command line.

Prerequisites

  • Docker installed on your machine (Linux, macOS, or Windows)
  • A GPU with CUDA support recommended (but CPU works too)
  • At least 2GB of free RAM (8GB recommended for 5-stem models)
  • An audio file in WAV or MP3 format to test with

Step 1 — Pull the Docker Image

docker pull researchdeezer/spleeter:latest

This downloads the official Spleeter Docker image with TensorFlow and all pretrained models pre-loaded. The image is about 2.5GB and includes GPU support if you have NVIDIA Docker runtime configured.

Step 2 — Separate Your First Track

Place your audio file in a local directory and mount it as a volume. Run the 2-stem model to isolate vocals from accompaniment:

docker run --gpus all -v $(pwd)/audio:/data researchdeezer/spleeter:latest separate -i /data/input.mp3 -o /data/output

Replace input.mp3 with your file name. The separated stems will be written to ./audio/output/input/ as vocals.wav and accompaniment.wav.

Spleeter on GitHub

Step 3 — Try 4-Stem and 5-Stem Separation

Spleeter also supports more detailed separation. For 4 stems (vocals, drums, bass, other):

docker run --gpus all -v $(pwd)/audio:/data researchdeezer/spleeter:latest separate -i /data/input.mp3 -o /data/output --stems 4

For 5 stems (vocals, drums, bass, piano, other):

docker run --gpus all -v $(pwd)/audio:/data researchdeezer/spleeter:latest separate -i /data/input.mp3 -o /data/output --stems 5

The more stems you request, the more RAM and VRAM are required. The 5-stem model is the most resource-intensive but gives the finest granularity.

Performance Tips

  • GPU: With an NVIDIA GPU, Spleeter processes audio 100x faster than real-time. A 3-minute track completes in under 2 seconds.
  • CPU: Without a GPU, expect ~1x real-time speed (a 3-minute track takes 2-3 minutes).
  • Batch Processing: Run multiple files by separating filenames with spaces after -i.
  • Output Format: Stems are always 44.1kHz 16-bit WAV files for maximum quality.

Troubleshooting

Out of memory: If you run into OOM errors, close other applications or use the CPU-only image by running without --gpus all.

Permission denied: Ensure the output directory is writable by the Docker user. Use sudo chmod 777 ./audio/output if needed.

File not found: Verify your audio file path is correct inside the container. Remember the path is relative to the container, not your host.

Conclusion

Spleeter via Docker is the fastest way to get professional music source separation running on your own infrastructure. Whether you are a musician, podcaster, or developer, you can have it up and running in under 5 minutes.

#spleeter #docker #source-separation #music #tutorial