f5-tts>=1.0.0 zieht als Dependency ein neueres torch mit zu neuem CUDA-Build und ueberschreibt den cu121-Pin → 'NVIDIA driver too old (found 12040)' auf Treiber 550. Nach der Installation wird dieselbe torch/torchaudio-Version als cu124-Build force-reinstalled (--no-deps), kompatibel mit 550/CUDA 12.4. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
1.3 KiB
Docker
34 lines
1.3 KiB
Docker
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 python3-pip ffmpeg git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# PyTorch CUDA-Wheels zuerst (f5-tts zieht sonst CPU-only Torch rein)
|
|
RUN pip3 install --no-cache-dir torch==2.3.1 torchaudio==2.3.1 \
|
|
--index-url https://download.pytorch.org/whl/cu121
|
|
|
|
COPY requirements.txt .
|
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
# f5-tts zieht als Dependency ein neueres torch (Default-Wheel, gegen ein zu neues
|
|
# CUDA gebaut) und ueberschreibt den cu121-Pin oben → "NVIDIA driver is too old
|
|
# (found version 12040)" auf Treiber 550/CUDA 12.4. Fix: DIESELBE torch-Version,
|
|
# aber als cu124-Build (kompatibel mit Treiber 550) erzwingen.
|
|
RUN set -e; \
|
|
TV="$(python3 -c 'import torch;print(torch.__version__.split(chr(43))[0])')"; \
|
|
AV="$(python3 -c 'import torchaudio;print(torchaudio.__version__.split(chr(43))[0])')"; \
|
|
echo "Re-pin torch==$TV torchaudio==$AV -> cu124"; \
|
|
pip3 install --no-cache-dir --force-reinstall --no-deps \
|
|
"torch==$TV" "torchaudio==$AV" \
|
|
--index-url https://download.pytorch.org/whl/cu124
|
|
|
|
COPY bridge.py .
|
|
|
|
CMD ["python3", "bridge.py"]
|