From 15bc02489fb1893594773df698f7b652e9523a8c Mon Sep 17 00:00:00 2001 From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:10:56 +0100 Subject: [PATCH] Disable Progress Bar When workflows triggered --- .github/workflows/docker-publish.yaml | 4 +++- Dockerfile | 16 +++++++++++++--- install.sh | 12 +++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 6aa93c32..ab335516 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -1,6 +1,6 @@ name: Build and Publish Docker Image -on: +on: workflow_dispatch: jobs: @@ -37,6 +37,7 @@ jobs: USE_FUNASR=true USE_FASTERWHISPER=false CUDA_VERSION=12.4 + WGET_SHOW_PROGRESS=0 tags: | xxxxrt666/gpt-sovits:lite-cu124-${{ steps.meta.outputs.tag }} xxxxrt666/gpt-sovits:latest-lite @@ -53,6 +54,7 @@ jobs: USE_FUNASR=true USE_FASTERWHISPER=true CUDA_VERSION=12.4 + WGET_SHOW_PROGRESS=0 tags: | xxxxrt666/gpt-sovits:cu124-${{ steps.meta.outputs.tag }} xxxxrt666/gpt-sovits:latest diff --git a/Dockerfile b/Dockerfile index 9fb6e41a..e037e787 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,17 @@ WORKDIR /workspace/GPT-SoVITS COPY . /workspace/GPT-SoVITS -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" && \ +ARG WGET_SHOW_PROGRESS=1 + +RUN if [ "$WGET_SHOW_PROGRESS" = "0" ]; then \ + echo 'WGET_CMD=wget -nv --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404' >> /env.list; \ + else \ + echo 'WGET_CMD=wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404' >> /env.list; \ + fi + +ENV $(cat /env.list) + +RUN $WGET_CMD -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 +47,7 @@ ARG USE_FASTERWHISPER=false RUN if [ "$USE_FUNASR" = "true" ]; then \ echo "Downloading funasr..." && \ - wget -nv --show-progress --tries=25 --wait=3 --read-timeout=40 "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/funasr.zip" && \ + $WGET_CMD "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 +56,7 @@ RUN if [ "$USE_FUNASR" = "true" ]; then \ RUN if [ "$USE_FASTERWHISPER" = "true" ]; then \ echo "Downloading faster-whisper..." && \ - wget -nv --show-progress --tries=25 --wait=3 --read-timeout=40 "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/faster-whisper.zip" && \ + $WGET_CMD "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 \ diff --git a/install.sh b/install.sh index 598dff11..4e931767 100644 --- a/install.sh +++ b/install.sh @@ -100,11 +100,17 @@ elif [ "$is_MODELSCOPE" = "true" ]; then UVR5_URL="https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/uvr5_weights.zip" fi +if [ "$WGET_SHOW_PROGRESS" = "0" ]; then + WGET_CMD="wget -nv --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404" +else + WGET_CMD="wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404" +fi + if find "GPT_SoVITS/pretrained_models" -mindepth 1 ! -name '.gitignore' | grep -q .; then echo "Pretrained Model Exists" else echo "Download Pretrained Models" - wget -nv --show-progress --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$PRETRINED_URL" + $WGET_CMD "$PRETRINED_URL" unzip pretrained_models.zip rm -rf pretrained_models.zip @@ -114,7 +120,7 @@ fi if [ ! -d "GPT_SoVITS/text/G2PWModel" ]; then echo "Download G2PWModel" - wget -nv --show-progress --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$G2PW_URL" + $WGET_CMD "$G2PW_URL" unzip G2PWModel.zip rm -rf G2PWModel.zip @@ -128,7 +134,7 @@ if [ "$DOWNLOAD_UVR5" = "true" ]; then echo "UVR5 Model Exists" else echo "Download UVR5 Model" - wget -nv --show-progress --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$UVR5_URL" + $WGET_CMD "$UVR5_URL" unzip uvr5_weights.zip rm -rf uvr5_weights.zip