Chatterbox-TTS-Extended
Chatterbox-TTS-Extended copied to clipboard
feat: Add Dockerfile and enable NLTK dependency
Summary
- Added comprehensive Dockerfile to enable containerized deployment with proper user management, environment configuration, and dependency installation
- Enabled CUDA library path configuration for proper GPU acceleration support
- Uncommented and enabled punkt_tab NLTK tokenizer download to ensure proper text processing capabilities with 3.8.2+
- Configured Gradio server settings including port, host, analytics, and sharing options
- Implemented proper file ownership and path management within the container
- Added Python virtual environment setup and dependency installation from requirements.txt
- Set up proper user switching for security best practices in containerized environment
- Included system package installation for ffmpeg support
NLTK reference: nltk/nltk#3293
Podman non-root example
I prefer to use rootless Podman with a non-root container user building like:
time podman build -t chatterbox-gradio --no-cache --build-arg="UID=123" --build-arg="GID=123" --build-arg="USER_HOME=/app" .
Run with persistent data:
touch ~/chatterbox-gradio-settings.json
podman run --rm -d --replace -p 127.0.0.1:7860:7860 -v chatterbox-gradio-cache:/app/.cache -v chatterbox-gradio-nltk-data:/app/nltk_data -v ~/chatterbox-gradio-settings.json:/app/settings.json -v ~/audio/output:/app/output --gpus all --name chatterbox-gradio localhost/chatterbox-gradio:latest
Docker root example
I've also tested using root within a Ubuntu 24.04 VM (CPU only). To build:
time docker build -t chatterbox-gradio --no-cache .
Run:
touch ~/chatterbox-gradio-settings.json
docker run --rm -d -p 127.0.0.1:7860:7860 -v chatterbox-gradio-cache:/root/.cache -v chatterbox-gradio-nltk-data:/root/nltk_data -v ~/chatterbox-gradio-settings.json:/app/settings.json -v ~/audio/output:/app/output --name chatterbox-gradio chatterbox-gradio:latest
Closes #55