Chatterbox-TTS-Server icon indicating copy to clipboard operation
Chatterbox-TTS-Server copied to clipboard

sigh, you tell it cpu and is says, no, nvidia

Open Innomen opened this issue 1 year ago • 4 comments

TTS_RUNTIME=cpu docker compose up -d --build WARN[0000] /home/innomen/AI/TTS/Chatterbox-TTS-Server/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion WARN[0000] Docker Compose is configured to build using Bake, but buildx isn't installed [+] Building 3.9s (16/16) FINISHED docker:default => [chatterbox-tts-server internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.50kB 0.0s => [chatterbox-tts-server internal] load metadata for docker.io/nvidia/cuda:12.8.1-r 2.1s => [chatterbox-tts-server internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [chatterbox-tts-server 1/10] FROM docker.io/nvidia/cuda:12.8.1-runtime-ubuntu22. 0.0s => [chatterbox-tts-server internal] load build context 0.0s => => transferring context: 4.37kB 0.0s => CACHED [chatterbox-tts-server 2/10] RUN apt-get update && apt-get install -y --n 0.0s => CACHED [chatterbox-tts-server 3/10] RUN ln -s /usr/bin/python3 /usr/bin/python 0.0s => CACHED [chatterbox-tts-server 4/10] WORKDIR /app 0.0s => CACHED [chatterbox-tts-server 5/10] COPY requirements.txt . 0.0s => CACHED [chatterbox-tts-server 6/10] RUN pip3 install --no-cache-dir --upgrade pi 0.0s => CACHED [chatterbox-tts-server 7/10] COPY requirements-nvidia.txt . 0.0s => CACHED [chatterbox-tts-server 8/10] RUN if [ "nvidia" = "nvidia" ]; then pip 0.0s => [chatterbox-tts-server 9/10] COPY . . 0.1s => [chatterbox-tts-server 10/10] RUN mkdir -p model_cache reference_audio outputs vo 0.2s => [chatterbox-tts-server] exporting to image 1.3s => => exporting layers 1.3s => => writing image sha256:6067fcfe2c985685dcd0abb22af25a6db430a214546d366a54e37e7a6 0.0s => => naming to docker.io/library/chatterbox-tts-server-chatterbox-tts-server 0.0s => [chatterbox-tts-server] resolving provenance for metadata file 0.0s [+] Running 1/2 ✔ chatterbox-tts-server Built 0.0s ⠋ Container chatterbox-tts-server-chatterbox-tts-server-1 Starting 0.1s Error response from daemon: could not select device driver "nvidia" with capabilities: [[gpu]]

Innomen avatar Jul 14 '25 07:07 Innomen

TTS Server Docker Setup Summary The Problem The docker-compose.yml file has hardcoded NVIDIA GPU settings that don't properly respect the TTS_RUNTIME=cpu environment variable, causing GPU driver errors even when trying to run CPU-only. The Solution Skip docker-compose and use docker run directly: bash# Stop any existing containers docker stop $(docker ps -q --filter ancestor=chatterbox-tts-server-chatterbox-tts-server)

Run with correct CPU settings and port mapping

docker run -d -p 5000:8004 -e TTS_RUNTIME=cpu chatterbox-tts-server-chatterbox-tts-server Key Points

Port mapping: The app runs on port 8004 inside the container, but you map it to port 5000 on your host Port format: -p HOST_PORT:CONTAINER_PORT so -p 5000:8004 maps your localhost:5000 to the container's port 8004 Access: Open http://localhost:5000 in your browser for the web interface API docs: Available at http://localhost:5000/docs

Quick Commands bash# Start TTS server docker run -d -p 5000:8004 -e TTS_RUNTIME=cpu chatterbox-tts-server-chatterbox-tts-server

Check if running

docker ps

Stop all TTS containers

docker stop $(docker ps -q --filter ancestor=chatterbox-tts-server-chatterbox-tts-server) Why docker-compose failed The compose file doesn't properly handle CPU-only mode and tries to use NVIDIA runtime regardless of the TTS_RUNTIME setting.

Innomen avatar Jul 14 '25 07:07 Innomen

Thank you for your excellent report. Based on your feedback, I have now created a separate docker-compose-cpu.yml file specifically for CPU-only users to resolve this issue permanently. I have also updated the README.md with the new, clearer instructions for all Docker users.

devnen avatar Jul 14 '25 21:07 devnen

Thank you for your excellent report. Based on your feedback, I have now created a separate docker-compose-cpu.yml file specifically for CPU-only users to resolve this issue permanently. I have also updated the README.md with the new, clearer instructions for all Docker users.

Woo! Thank you! Hype.

Innomen avatar Jul 14 '25 21:07 Innomen

config.yaml now defaults to device: auto so the engine picks CUDA / MPS / CPU based on what is actually available, and there is a dedicated docker-compose-cpu.yml (built on python:3.10-slim, no CUDA base image) for CPU-only setups. The old TTS_RUNTIME=cpu env-var trick is no longer needed. Closing as resolved by these changes, please reopen if docker-compose-cpu.yml still misbehaves on your box.

devnen avatar May 11 '26 14:05 devnen