From 76020a920616513b98175d8614838bd00d468ae1 Mon Sep 17 00:00:00 2001 From: amlyczz Date: Sun, 12 Apr 2026 23:16:28 +0800 Subject: [PATCH] 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 --- Dockerfile | 2 ++ install.sh | 8 ++++---- requirements.txt | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30cd3eaf..f5f1f506 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" diff --git a/install.sh b/install.sh index da0fb839..f457ed32 100644 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/requirements.txt b/requirements.txt index 3b7cd898..034713ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,6 @@ cn2an pypinyin pyopenjtalk>=0.4.1 g2p_en -torchaudio modelscope sentencepiece transformers>=4.43,<=4.50