voice clone config and improved installation/launch

This commit is contained in:
Liam Pettigrew
2026-02-06 12:44:13 +11:00
parent b1c26f5ce0
commit becd782f2f
15 changed files with 215 additions and 119 deletions
+16 -26
View File
@@ -1,45 +1,35 @@
# Use NVIDIA CUDA base image (includes nvcc compiler for building)
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
# Use PyTorch image with CUDA support (includes Python 3.11, PyTorch, CUDA)
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
# Avoid interactive prompts during package installation
# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install Python 3.12 and build tools
# Install system dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update && apt-get install -y \
python3.12 \
python3.12-venv \
python3.12-dev \
python3-pip \
git \
build-essential \
cmake \
sox \
libsox-dev \
libsox-fmt-all \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Set Python 3.12 as default
RUN ln -s /usr/bin/python3.12 /usr/bin/python
WORKDIR /app
# 2. Set Environment Variables to force CUDA build
# -DGGML_CUDA=on is the flag for recent llama-cpp-python versions (0.3.x)
# Set Environment Variables for llama-cpp-python CUDA build
ENV CMAKE_ARGS="-DGGML_CUDA=on"
ENV FORCE_CMAKE=1
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-deps git+https://github.com/rekuenkdr/Qwen3-TTS-streaming.git@97da215 && \
pip install flash-attn --no-build-isolation
# 3. Install dependencies
# This will now compile llama-cpp-python with CUDA support
RUN python3.12 -m pip install --upgrade pip && \
python3.12 -m pip install --no-cache-dir -r requirements.txt
# Copy application files (ignoring __pycache__ via .dockerignore)
# Copy application code
COPY app.py .
COPY core/ core/
COPY tools/ tools/
COPY utils/ utils/
COPY wav/ wav/
COPY audio/ audio/
CMD ["python3.12", "app.py"]
CMD ["python", "app.py"]