diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index f371107e..9fa3f633 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -72,6 +72,7 @@ jobs: USE_FASTERWHISPER=${{ matrix.use_fasterwhisper }} CUDA_VERSION=${{ matrix.cuda_version }} WGET_CMD=wget -nv --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 + SKIP_CHECK=true tags: | xxxxrt666/gpt-sovits:${{ matrix.tag_prefix }}-${{ needs.generate-meta.outputs.tag }} xxxxrt666/gpt-sovits:latest-${{ matrix.tag_prefix }} diff --git a/Dockerfile b/Dockerfile index 42f20caf..dfd5186e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,9 +70,12 @@ ENV PATH="/usr/local/cuda/bin:$PATH" ENV CUDA_HOME="/usr/local/cuda" ENV MAKEFLAGS="-j$(nproc)" +ARG SKIP_CHECK = false +ENV SKIP_CHECK=${SKIP_CHECK} + RUN source /root/anaconda3/etc/profile.d/conda.sh && \ conda activate GPTSoVITS && \ - bash install.sh --device CU${CUDA_VERSION//./} --source HF --download-uvr5 && \ + bash install.sh --device CU${CUDA_VERSION//./} --source HF --skip-check ${SKIP_CHECK} --download-uvr5 && \ pip cache purge RUN rm -rf /root/anaconda3/pkgs diff --git a/install.sh b/install.sh index b376361d..a3589545 100644 --- a/install.sh +++ b/install.sh @@ -17,6 +17,7 @@ trap 'echo "Error Occured at \"$BASH_COMMAND\" with exit code $?"; exit 1' ERR USE_CUDA=false USE_ROCM=false USE_CPU=false +SKIP_CHECK=false USE_HF=false USE_HF_MIRROR=false @@ -65,6 +66,17 @@ while [[ $# -gt 0 ]]; do esac shift 2 ;; + --skip-check) + case "$2" in + true) + SKIP_CHECK=true + ;; + *) + : + ;; + esac + shift 2 + ;; --device) case "$2" in CU124) @@ -195,17 +207,18 @@ conda install zip -y git-lfs install -if [ "$USE_CUDA" = true ]; then +if [ "$USE_CUDA" = true ] && [ $SKIP_CHECK = false ]; then echo "Checking for CUDA installation..." if command -v nvidia-smi &>/dev/null; then echo "CUDA found." else USE_CUDA=false + USE_CPU=true echo "CUDA not found." fi fi -if [ "$USE_ROCM" = true ]; then +if [ "$USE_ROCM" = true ] && [ $SKIP_CHECK = false ]; then echo "Checking for ROCm installation..." if [ -d "/opt/rocm" ]; then echo "ROCm found." @@ -218,6 +231,7 @@ if [ "$USE_ROCM" = true ]; then fi else USE_ROCM=false + USE_CPU=true echo "ROCm not found." fi fi