From b51b87b2d12167a67c9746c5685c880807696981 Mon Sep 17 00:00:00 2001 From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com> Date: Tue, 29 Apr 2025 18:33:53 +0100 Subject: [PATCH] Fix Bugs --- .github/workflows/docker-publish.yaml | 5 +-- Dockerfile | 10 ++--- install.sh | 60 +++++++++++++-------------- 3 files changed, 35 insertions(+), 40 deletions(-) diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index c6e68a5e..6aa93c32 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -2,9 +2,6 @@ name: Build and Publish Docker Image on: workflow_dispatch: - push: - branches: - - Docker jobs: build-and-push: @@ -28,7 +25,7 @@ jobs: run: | DATE=$(date +'%Y%m%d') COMMIT=$(git rev-parse --short=6 HEAD) - echo "::set-output name=tag::${DATE}-${COMMIT}" + echo "tag=${DATE}-${COMMIT}" >> $GITHUB_OUTPUT - name: Build and Push Lite Docker Image uses: docker/build-push-action@v5 diff --git a/Dockerfile b/Dockerfile index 5637c38b..9fb6e41a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ WORKDIR /workspace/GPT-SoVITS COPY . /workspace/GPT-SoVITS -RUN wget --tries=25 --wait=3 --read-timeout=40 -O anaconda.sh "https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh" && \ +RUN wget -nv --show-progress --tries=25 --wait=3 --read-timeout=40 -O anaconda.sh "https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh" && \ bash anaconda.sh -b -p /root/anaconda3 && \ rm anaconda.sh @@ -37,7 +37,7 @@ ARG USE_FASTERWHISPER=false RUN if [ "$USE_FUNASR" = "true" ]; then \ echo "Downloading funasr..." && \ - wget --tries=25 --wait=3 --read-timeout=40 "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/funasr.zip" && \ + wget -nv --show-progress --tries=25 --wait=3 --read-timeout=40 "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/funasr.zip" && \ unzip funasr.zip -d tools/asr/models/ && \ rm -rf funasr.zip ; \ else \ @@ -46,7 +46,7 @@ RUN if [ "$USE_FUNASR" = "true" ]; then \ RUN if [ "$USE_FASTERWHISPER" = "true" ]; then \ echo "Downloading faster-whisper..." && \ - wget --tries=25 --wait=3 --read-timeout=40 "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/faster-whisper.zip" && \ + wget -nv --show-progress --tries=25 --wait=3 --read-timeout=40 "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/faster-whisper.zip" && \ unzip faster-whisper.zip -d tools/asr/models/ && \ rm -rf faster-whisper.zip ; \ else \ @@ -65,13 +65,11 @@ ENV MAKEFLAGS="-j$(nproc)" RUN source /root/anaconda3/etc/profile.d/conda.sh && \ conda activate GPTSoVITS && \ - bash /workspace/install.sh --source HF --download-uvr5 && \ + bash install.sh --source HF --download-uvr5 && \ pip cache purge RUN rm -rf /root/anaconda3/pkgs EXPOSE 9871 9872 9873 9874 9880 -WORKDIR /workspace/GPT-SoVITS - CMD ["/bin/bash", "-c", "source /root/anaconda3/etc/profile.d/conda.sh && conda activate GPTSoVITS && export PYTHONPATH=$(pwd) && exec bash"] \ No newline at end of file diff --git a/install.sh b/install.sh index e45b91b1..598dff11 100644 --- a/install.sh +++ b/install.sh @@ -41,38 +41,38 @@ fi # Parse arguments while [[ $# -gt 0 ]]; do case "$1" in - --source) - case "$2" in - HF) - is_HF=true - ;; - HF-Mirror) - is_HF_MIRROR=true - ;; - ModelScope) - is_MODELSCOPE=true - ;; - *) - echo "Error: Invalid Download Source: $2" - echo "Choose From: [HF, HF-Mirror, ModelScope]" - exit 1 - ;; - esac - shift 2 + --source) + case "$2" in + HF) + is_HF=true ;; - --download-uvr5) - DOWNLOAD_UVR5=true - shift + HF-Mirror) + is_HF_MIRROR=true ;; - -h|--help) - print_help - exit 0 + ModelScope) + is_MODELSCOPE=true ;; *) - echo "Unknown Argument: $1" - echo "Use -h or --help to see available options." + echo "Error: Invalid Download Source: $2" + echo "Choose From: [HF, HF-Mirror, ModelScope]" exit 1 ;; + esac + shift 2 + ;; + --download-uvr5) + DOWNLOAD_UVR5=true + shift + ;; + -h | --help) + print_help + exit 0 + ;; + *) + echo "Unknown Argument: $1" + echo "Use -h or --help to see available options." + exit 1 + ;; esac done @@ -104,7 +104,7 @@ if find "GPT_SoVITS/pretrained_models" -mindepth 1 ! -name '.gitignore' | grep - echo "Pretrained Model Exists" else echo "Download Pretrained Models" - wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$PRETRINED_URL" + wget -nv --show-progress --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$PRETRINED_URL" unzip pretrained_models.zip rm -rf pretrained_models.zip @@ -114,7 +114,7 @@ fi if [ ! -d "GPT_SoVITS/text/G2PWModel" ]; then echo "Download G2PWModel" - wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$G2PW_URL" + wget -nv --show-progress --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$G2PW_URL" unzip G2PWModel.zip rm -rf G2PWModel.zip @@ -123,12 +123,12 @@ else echo "G2PWModel Exists" fi -if [ "$DOWNLOAD_UVR5" = "true" ];then +if [ "$DOWNLOAD_UVR5" = "true" ]; then if find "tools/uvr5/uvr5_weights" -mindepth 1 ! -name '.gitignore' | grep -q .; then echo "UVR5 Model Exists" else echo "Download UVR5 Model" - wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$UVR5_URL" + wget -nv --show-progress --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$UVR5_URL" unzip uvr5_weights.zip rm -rf uvr5_weights.zip