Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(easy-installation): fix .BAT installer error and update to cu118 #232

Merged
merged 5 commits into from
Apr 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions easy-installation/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ if %errorlevel%==0 (
echo Checking GPU...
nvidia-smi >nul 2>&1
if %errorlevel%==0 (
set GPU=1
echo found a GPU
) else (
set GPU=0
echo no GPU found
)

if %GPU%==1 (
nvidia-smi >nul 2>&1
if %errorlevel%==0 (
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 Please install CUDA 11.7 from https://developer.nvidia.com/cuda-11-8-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" (
if exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\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
Expand All @@ -47,9 +48,10 @@ 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
nvidia-smi >nul 2>&1
if %errorlevel%==0 (
echo Installing PyTorch with GPU support...
venv\Scripts\pip.exe install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
) else (
echo Installing PyTorch without GPU support...
venv\Scripts\pip.exe install torch torchaudio
Expand Down