-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
132 lines (119 loc) · 3.72 KB
/
Copy pathinstall.bat
File metadata and controls
132 lines (119 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@echo off
setlocal enabledelayedexpansion
echo ========================================
echo Deliberate AI - Windows Installer
echo ========================================
echo.
REM Check if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python not found!
echo Please install Python 3.10, 3.11, or 3.12 from https://www.python.org/
pause
exit /b 1
)
echo [0/7] Checking Visual C++ Redistributable...
REM Check if VC++ redistributable is installed (registry key)
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" /v Version >nul 2>&1
if errorlevel 1 (
echo [WARNING] Microsoft Visual C++ 2015-2022 Redistributable not found!
echo This is required for PyTorch to work on Windows.
echo Download and install from:
echo https://aka.ms/vs/17/release/vc_redist.x64.exe
echo.
echo You can install it now or after installation completes.
echo.
set VC_Redist_Needed=1
) else (
echo Visual C++ Redistributable found
set VC_Redist_Needed=0
)
echo.
echo [1/7] Checking for NVIDIA GPU...
echo.
echo [1/7] Checking for NVIDIA GPU...
REM Check if NVIDIA GPU is available
powershell -Command "Get-CimInstance Win32_VideoController | Where-Object { $_.Name -like '*NVIDIA*' }" >nul 2>&1
if errorlevel 1 (
echo [INFO] No NVIDIA GPU detected or NVIDIA drivers not installed
echo Installing CPU version of PyTorch (works on all systems)
set USE_GPU=0
) else (
echo [INFO] NVIDIA GPU detected
echo Installing GPU-accelerated PyTorch (CUDA support)
set USE_GPU=1
)
echo.
echo [2/7] Creating virtual environment...
if not exist "venv" (
py -3.10 -m venv venv
if errorlevel 1 (
echo [ERROR] Failed to create virtual environment
echo Make sure Python 3.10 is installed (py -3.10)
pause
exit /b 1
)
) else (
echo Virtual environment already exists
)
echo.
echo [3/7] Activating virtual environment...
call venv\Scripts\activate.bat
echo.
echo [4/7] Upgrading pip...
python -m pip install --upgrade pip --quiet
echo.
echo [5/7] Installing PyTorch...
if !USE_GPU!==1 (
echo Installing GPU-accelerated PyTorch (CUDA 12.1)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 --quiet
) else (
echo Installing CPU-only PyTorch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --quiet
)
if errorlevel 1 (
echo [ERROR] Failed to install PyTorch
pause
exit /b 1
)
echo.
echo [6/7] Installing remaining dependencies...
echo This may take a few minutes...
pip install -r requirements.txt --quiet
if errorlevel 1 (
echo [ERROR] Failed to install dependencies
pause
exit /b 1
)
echo.
echo [7/7] Downloading Kokoro voice models...
python scripts\download_voices.py
if errorlevel 1 (
echo [WARNING] Voice download failed. Voices will be downloaded on first run.
)
echo.
echo [7/7] Installation complete!
echo.
echo ========================================
echo Installation Complete!
echo ========================================
echo.
echo Next steps:
echo 1. Edit 'settings.json' with your vLLM endpoint and model
echo 2. Run 'start.bat' to launch the application
echo.
if !VC_Redist_Needed!==1 (
echo [IMPORTANT] If you get a DLL error when starting the app:
echo Install Visual C++ Redistributable from:
echo https://aka.ms/vs/17/release/vc_redist.x64.exe
echo.
)
if !USE_GPU!==1 (
echo [INFO] GPU acceleration enabled! PyTorch will use your NVIDIA GPU.
) else (
echo [INFO] Running in CPU mode. For faster TTS, install an NVIDIA GPU.
)
echo.
echo For help, see README.md
echo.
pause