This commit is contained in:
XXXXRT666 2025-04-30 23:20:30 +01:00
parent 756e0e3a9f
commit b6d7e971a9
5 changed files with 16 additions and 7 deletions

View File

@ -41,6 +41,8 @@ rm anaconda.sh
rm $LOG_PATH rm $LOG_PATH
rm -rf "$HOME/anaconda3/pkgs/*" sudo rm -rf "$HOME/anaconda3/pkgs"
mkdir "$HOME/anaconda3/pkgs"
rm -rf "$HOME/.conda" "$HOME/.cache" rm -rf "$HOME/.conda" "$HOME/.cache"

View File

@ -52,6 +52,12 @@ conda config --add channels conda-forge
conda update --all -y conda update --all -y
if [ "$CUDA_VERSION" = 128 ]; then
pip install torch torchaudio --no-cache-dir --index-url https://download.pytorch.org/whl/cu128
elif [ "$CUDA_VERSION" = 124 ]; then
pip install torch==2.5.1 torchaudio==2.5.1 --no-cache-dir --index-url https://download.pytorch.org/whl/cu124
fi
if [ "$LITE" = "true" ]; then if [ "$LITE" = "true" ]; then
bash install.sh --device "CU${CUDA_VERSION//./}" --source HF bash install.sh --device "CU${CUDA_VERSION//./}" --source HF
elif [ "$LITE" = "false" ]; then elif [ "$LITE" = "false" ]; then
@ -66,6 +72,8 @@ pip show torch
rm -rf /tmp/* /var/tmp/* rm -rf /tmp/* /var/tmp/*
rm -rf "$HOME/anaconda3/pkgs/*" sudo rm -rf "$HOME/anaconda3/pkgs"
mkdir "$HOME/anaconda3/pkgs"
rm -rf /root/.conda /root/.cache rm -rf /root/.conda /root/.cache

View File

@ -38,7 +38,6 @@ ENV WORKFLOW=${WORKFLOW}
ARG TARGETPLATFORM ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM} ENV TARGETPLATFORM=${TARGETPLATFORM}
RUN echo "${TARGETPLATFORM}" && echo ${WORKFLOW}
ENV HOME="/root" ENV HOME="/root"

View File

@ -70,6 +70,6 @@ TARGETPLATFORM=$(uname -m | grep -q 'x86_64' && echo "linux/amd64" || echo "linu
docker build \ docker build \
--build-arg CUDA_VERSION=$CUDA_VERSION \ --build-arg CUDA_VERSION=$CUDA_VERSION \
--build-arg LITE=$LITE \ --build-arg LITE=$LITE \
--build-arg TARGETPLATFORM="$TARGETPLATFORM" --build-arg TARGETPLATFORM="$TARGETPLATFORM" \
-t "${USER}/gpt-sovits:local" \ -t "${USER}/gpt-sovits:local" \
. .

View File

@ -226,14 +226,14 @@ if [ "$USE_ROCM" = true ] && [ "$WORKFLOW" = false ]; then
fi fi
fi fi
if [ "$USE_CUDA" = true ]; then if [ "$USE_CUDA" = true ] && [ "$WORKFLOW" = false ]; then
echo "Installing PyTorch with CUDA support..." echo "Installing PyTorch with CUDA support..."
if [ "$CUDA_VERSION" = 128 ]; then if [ "$CUDA_VERSION" = 128 ]; then
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu128 pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu128
elif [ "$CUDA_VERSION" = 124 ]; then elif [ "$CUDA_VERSION" = 124 ]; then
pip install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124 pip install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
fi fi
elif [ "$USE_ROCM" = true ]; then elif [ "$USE_ROCM" = true ] && [ "$WORKFLOW" = false ]; then
echo "Installing PyTorch with ROCm support..." echo "Installing PyTorch with ROCm support..."
pip install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/rocm6.2 pip install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/rocm6.2
elif [ "$USE_CPU" = true ]; then elif [ "$USE_CPU" = true ]; then