Skip to content

Docker Support (Beta)

erew123 edited this page Dec 20, 2024 · 5 revisions

The Docker build for AllTalk including these instructions, is currently in Beta. While functional, it is still undergoing testing and refinement. Please keep the following caveats in mind:


Important Notes

  • Windows Compatibility: Not fully tested. Some users may encounter issues.
  • CPU-Only Usage: Compatibility not guaranteed. Currently tested with GPU.
  • Root User: The Python application may run as root, which is not recommended for production environments. This will be addressed in a future update.
  • Gradio Integration: Gradio UI functionality has not been fully validated, but the general UI works.

For any feedback, questions, or issues, please join the discussion at the following link:
➡️ Docker Build Discussion


Features of the Docker Build

  1. TTS Engine: Downloads and enables XTTS as the default TTS engine.
  2. RVC Models: Automatically downloads and enables all supported RVC models.
  3. DeepSpeed Integration: DeepSpeed is built and enabled by default for performance optimization.
  4. Scripts for Simplification:
    • docker-build.sh: Automates building of the conda environment and DeepSpeed.
    • docker-start.sh: Simplifies container startup with various optional arguments.
  5. Documentation: A detailed DOCKER_README.md is included in the repository, covering arguments and setup.

Quick Start Guide

Prerequisites

  • Linux or Windows with Docker installed.
  • NVIDIA GPUs (if using GPU support).
    See platform-specific setup instructions below.

Build and Run

  1. Clone the repository and navigate to its root directory:
    git clone https://github.com/erew123/alltalk_tts.git
    cd alltalk_tts
  2. Build the Docker image:
    ./docker-build.sh
  3. Start the Docker container:
    ./docker-start.sh
  4. Open the application in your browser at:
    http://localhost:7851/

Platform-Specific Setup

Linux

Ubuntu GPU Setup

  1. Ensure the latest NVIDIA drivers are installed:
    sudo ubuntu-drivers install
  2. Install Docker. Follow the official Docker documentation.
  3. If GPU errors occur, install the NVIDIA Docker Container Toolkit:
    sudo nvidia-ctk runtime configure --runtime=docker
    sudo systemctl restart docker

Windows (WSL2)

  1. Install WSL2 via PowerShell:
    wsl --install
  2. Set up CUDA Toolkit:
    wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
    sudo dpkg -i cuda-keyring_1.1-1_all.deb
    sudo apt-get update
    sudo apt-get -y install cuda-toolkit-12-4
  3. Install Docker Desktop with WSL2 backend and restart your system.

Customization Options

Build Arguments

  • TTS Model: Choose between piper, vits, or xtts:
    ./docker-build.sh --tts_model piper
  • Clean Build: Remove existing dependencies and rebuild:
    ./docker-build.sh --clean

Start Arguments

  • Custom Config: Use a specific JSON config file:
    ./docker-start.sh --config /path/to/config.json
  • Disable UI: Skip Gradio UI exposure:
    ./docker-start.sh --no_ui

For a full list of options, refer to the DOCKER_README.md.


Known Limitations

  • Docker Image Size: The image is approximately 21 GB, with additional space required for build processes.
  • CUDA Support: Currently supports CUDA 12.4. Upgrading to newer CUDA versions is not yet possible due to dependency constraints.

Contributing and Feedback

This build is a work-in-progress, and community feedback is vital for its improvement. If you encounter any issues, have suggestions, or want to contribute, please visit:

➡️ Docker Build Discussion

Clone this wiki locally