fix: ensure torchaudio matches PyTorch CUDA version and add libnppicc

- Install torchaudio from same PyTorch index URL to avoid CUDA version mismatch
- Remove torchaudio from requirements.txt to prevent wrong version from PyPI
- Add libnppicc-12 to Dockerfile for torchcodec backend dependency
This commit is contained in:
amlyczz 2026-04-12 23:16:28 +08:00
parent 2d9193b0d3
commit 76020a9206
3 changed files with 6 additions and 5 deletions

View File

@ -34,6 +34,8 @@ COPY install.sh /workspace/GPT-SoVITS/
RUN bash Docker/install_wrapper.sh
RUN apt-get update && apt-get install -y libnppicc-12 && rm -rf /var/lib/apt/lists/*
EXPOSE 9871 9872 9873 9874 9880
ENV PYTHONPATH="/workspace/GPT-SoVITS"

View File

@ -326,17 +326,17 @@ fi
if [ "$USE_CUDA" = true ] && [ "$WORKFLOW" = false ]; then
if [ "$CUDA" = 128 ]; then
echo -e "${INFO}Installing PyTorch For CUDA 12.8..."
run_pip_quiet torch torchcodec --index-url "https://download.pytorch.org/whl/cu128"
run_pip_quiet torch torchaudio torchcodec --index-url "https://download.pytorch.org/whl/cu128"
elif [ "$CUDA" = 126 ]; then
echo -e "${INFO}Installing PyTorch For CUDA 12.6..."
run_pip_quiet torch torchcodec --index-url "https://download.pytorch.org/whl/cu126"
run_pip_quiet torch torchaudio torchcodec --index-url "https://download.pytorch.org/whl/cu126"
fi
elif [ "$USE_ROCM" = true ] && [ "$WORKFLOW" = false ]; then
echo -e "${INFO}Installing PyTorch For ROCm 6.2..."
run_pip_quiet torch torchcodec --index-url "https://download.pytorch.org/whl/rocm6.2"
run_pip_quiet torch torchaudio torchcodec --index-url "https://download.pytorch.org/whl/rocm6.2"
elif [ "$USE_CPU" = true ] && [ "$WORKFLOW" = false ]; then
echo -e "${INFO}Installing PyTorch For CPU..."
run_pip_quiet torch torchcodec --index-url "https://download.pytorch.org/whl/cpu"
run_pip_quiet torch torchaudio torchcodec --index-url "https://download.pytorch.org/whl/cpu"
elif [ "$WORKFLOW" = false ]; then
echo -e "${ERROR}Unknown Err"
exit 1

View File

@ -15,7 +15,6 @@ cn2an
pypinyin
pyopenjtalk>=0.4.1
g2p_en
torchaudio
modelscope
sentencepiece
transformers>=4.43,<=4.50