From 9b9cb6f0c9f6e5517665d68468b9cc7bad1cc71d Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sat, 25 Mar 2023 16:32:52 +0900 Subject: [PATCH] chore: add bat file and Dockerfile to easily install the package (#110) --- .dockerignore | 2 ++ Dockerfile | 6 ++++ README.md | 6 ++++ easy-installation/install.bat | 62 +++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 easy-installation/install.bat diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..ea32980d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +# Ignore everything +* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..1e40a4e6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime +RUN ["apt", "update"] +RUN ["apt", "install", "-y", "build-essential"] +RUN ["pip", "install", "-U", "pip", "setuptools", "wheel"] +RUN ["pip", "install", "-U", "so-vits-svc-fork"] +ENTRYPOINT [ "svcg" ] diff --git a/README.md b/README.md index 0ae9f4a4..5901d0c4 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,12 @@ A fork of [`so-vits-svc`](https://github.com/svc-develop-team/so-vits-svc) with ## Installation +### One click easy installation + + + Download .bat + + ### [Creating a Virtual Environment](https://github.com/34j/so-vits-svc-fork/wiki#creating-a-virtual-environment) ### Install diff --git a/easy-installation/install.bat b/easy-installation/install.bat new file mode 100644 index 00000000..eeda02d9 --- /dev/null +++ b/easy-installation/install.bat @@ -0,0 +1,62 @@ +@echo off + +echo Checking for Python 3.10... + +py -3.10 --version >nul 2>&1 +if %errorlevel%==0 ( + echo Python 3.10 is already installed. +) else ( + echo Python 3.10 is not installed. Downloading installer... + curl https://www.python.org/ftp/python/3.10.10/python-3.10.10-amd64.exe -o python-3.10.10-amd64.exe + + echo Installing Python 3.10... + python-3.10.10-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 + + echo Cleaning up installer... + del python-3.10.10-amd64.exe +) + +echo Checking GPU... +nvidia-smi >nul 2>&1 +if %errorlevel%==0 ( + set GPU=1 +) else ( + set GPU=0 +) + +if %GPU%==1 ( + echo Checking CUDA... + nvcc --version + if %errorlevel%==0 ( + echo CUDA is already installed. + ) else ( + echo Please install CUDA 11.7 from https://developer.nvidia.com/cuda-11-7-0-download-archive?target_os=Windows & exit /b 1 + ) + + echo Checking cuDNN... + if exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin\cudnn64_8.dll" ( + echo cuDNN is already installed. + ) else ( + echo Please install cuDNN for CUDA 11.x from https://developer.nvidia.com/cudnn (https://developer.nvidia.com/downloads/compute/cudnn/secure/8.8.1/local_installers/11.8/cudnn-windows-x86_64-8.8.1.3_cuda11-archive.zip/) & exit /b 1 + ) +) + +echo Creating virtual environment... +py -3.10 -m venv venv + +echo Updating pip and wheel... +venv\Scripts\python.exe -m pip install --upgrade pip wheel + +if %GPU%==1 ( + echo Installing PyTorch with GPU support... + venv\Scripts\pip.exe install torch torchaudio --index-url https://download.pytorch.org/whl/cu117 +) else ( + echo Installing PyTorch without GPU support... + venv\Scripts\pip.exe install torch torchaudio +) + +echo Installing so-vits-svc-fork... +venv\Scripts\pip.exe install so-vits-svc-fork + +echo Launching so-vits-svc-fork GUI... +venv\Scripts\svcg.exe