-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_cuda.bat
More file actions
22 lines (17 loc) · 828 Bytes
/
setup_cuda.bat
File metadata and controls
22 lines (17 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off
echo Installing CUDA-enabled PyTorch for GPU acceleration...
echo.
echo Uninstalling CPU-only PyTorch...
pip uninstall torch torchvision torchaudio -y
echo.
echo Installing CUDA 11.8 enabled PyTorch...
pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0+cu118 --index-url https://download.pytorch.org/whl/cu118
echo.
echo Installing other dependencies...
pip install -r requirements.txt
echo.
echo Testing CUDA availability...
python -c "import torch; print('PyTorch version:', torch.__version__); print('CUDA available:', torch.cuda.is_available()); print('GPU count:', torch.cuda.device_count() if torch.cuda.is_available() else 0); print('GPU name:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'N/A')"
echo.
echo Setup complete! Press any key to exit...
pause > nul