Swapped back to qwen3-tts

This commit is contained in:
2026-05-05 16:42:49 +10:00
parent e90d2b1ec2
commit 109084e8e4
3 changed files with 100 additions and 78 deletions

View File

@@ -1,37 +1,33 @@
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
# Prevent interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
# 1. Install Python 3.12 and SoX dependencies
RUN apt-get update && apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get update && apt-get install -y \
python3.12 \
python3.12-dev \
curl \
git \
libsndfile1 \
ffmpeg \
sox \
libsox-dev && \
# No deadsnakes PPA needed. Native Python 3.10 works perfectly.
RUN apt-get update && apt-get install -y \
python3 python3-dev python3-pip curl git libsndfile1 ffmpeg sox libsox-dev ninja-build && \
rm -rf /var/lib/apt/lists/*
# 2. Use the official bootstrap to install a clean Pip for 3.12
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
WORKDIR /app
# 3. Explicitly install BOTH torch and torchaudio from the cu124 index
RUN python3.12 -m pip install --no-cache-dir torch==2.6.0 torchaudio --index-url https://download.pytorch.org/whl/cu124
RUN python3.12 -m pip install --no-cache-dir fastapi uvicorn numpy soundfile
# Install Torch and core packages
RUN python3 -m pip install --no-cache-dir torch==2.6.0 torchaudio --index-url https://download.pytorch.org/whl/cu124
# 4. Install the local Qwen3-TTS requirements
RUN python3.12 -m pip install --no-cache-dir faster-qwen3-tts
# 1. Install foundational build tools and numpy first
RUN python3 -m pip install --no-cache-dir numpy setuptools wheel ninja packaging psutil
COPY tts-server.py .
# 2. Install the rest of the stack that relies on numpy being present
RUN python3 -m pip install --no-cache-dir fastapi uvicorn soundfile librosa transformers==4.57.3 accelerate sox onnxruntime
# Force ABI compatibility for the C++ compiler
ENV _GLIBCXX_USE_CXX11_ABI=0
ENV MAX_JOBS=8
# Install flash-attn
RUN python3 -m pip install --no-cache-dir flash-attn --no-build-isolation
COPY swarm-control/indra-tts-server/tts-server.py .
EXPOSE 8002
CMD ["python3.12", "tts-server.py"]
CMD ["python3", "tts-server.py"]