-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
36 lines (28 loc) · 1.05 KB
/
setup.bat
File metadata and controls
36 lines (28 loc) · 1.05 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
@echo off
REM Check for Python 3.10 at the specified path
set "PYTHON310_PATH=C:\Users\onuru\AppData\Local\Programs\Python\Python310"
REM Check for Python 3.10 at the specified path using the variable
if exist "%PYTHON310_PATH%\python.exe" (
echo Python 3.10 found at specified path, using Python 3.10
set "PYTHON_EXEC=%PYTHON310_PATH%\python.exe"
) else (
echo Python 3.10 not found at specified path, using default python interpreter
set "PYTHON_EXEC=python"
)
echo Using Python interpreter: %PYTHON_EXEC%
%PYTHON_EXEC% --version
REM Create a virtual environment in the 'venv' directory
%PYTHON_EXEC% -m venv venv
REM Activate the virtual environment
call venv\Scripts\activate
REM Upgrade pip
python -m pip install --upgrade pip
REM Install the required packages from requirements.txt
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
echo.
echo Setup complete. The virtual environment is activated.
echo Press any key to exit...
pause >nul
REM Keep the window open
cmd /k