Skip to content

Commit

Permalink
chore: add bat file and Dockerfile to easily install the package (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
34j authored Mar 25, 2023
1 parent 4df46ee commit 9b9cb6f
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore everything
*
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<a href="https://github.com/34j/so-vits-svc-fork/releases/download/v1.3.2/install.bat" download>
<img src="https://img.shields.io/badge/.bat-download-blue?style=flat-square&logo=windows" alt="Download .bat">
</a>

### [Creating a Virtual Environment](https://github.com/34j/so-vits-svc-fork/wiki#creating-a-virtual-environment)

### Install
Expand Down
62 changes: 62 additions & 0 deletions easy-installation/install.bat
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9b9cb6f

Please sign in to comment.