forked from theroyallab/tabbyAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.bat
28 lines (21 loc) · 746 Bytes
/
start.bat
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
@echo off
:: Creates a venv if it doesn't exist and runs the start script for requirements upgrades
:: This is intended for users who want to start the API and have everything upgraded and installed
cd "%~dp0"
:: Don't create a venv if a conda environment is active
if exist "%CONDA_PREFIX%" (
echo It looks like you're in a conda environment. Skipping venv check.
) else (
if not exist "venv\" (
echo Venv doesn't exist! Creating one for you.
python -m venv venv
if exist "start_options.json" (
echo Removing old start_options.json
del start_options.json
)
)
call .\venv\Scripts\activate.bat
)
:: Call the python script with batch args
call python start.py %*
pause