mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-29 02:31:48 +00:00
Revert "Start: Add an argument parser to batch file"
This reverts commit 097c298c39.
This commit is contained in:
14
Start.bat
14
Start.bat
@@ -1,25 +1,13 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set VENV_DIR=
|
set VENV_DIR=
|
||||||
:: Requirements file to use. Defaults to nowheel to avoid mis-installation of dependencies
|
|
||||||
set REQUIREMENTS_FILE=
|
set REQUIREMENTS_FILE=
|
||||||
|
|
||||||
if not defined PYTHON (set PYTHON=python)
|
if not defined PYTHON (set PYTHON=python)
|
||||||
if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")
|
if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")
|
||||||
:: Doesn't update wheels by default
|
|
||||||
if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements-nowheel.txt")
|
if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements-nowheel.txt")
|
||||||
|
|
||||||
if not exist %VENV_DIR%\ (
|
|
||||||
echo "Please create a venv and install dependencies before starting TabbyAPI! Exiting..."
|
|
||||||
exit
|
|
||||||
)
|
|
||||||
|
|
||||||
:: Argument parsing
|
|
||||||
for %%A in (%*) do (
|
|
||||||
if %%A == "--ignore-upgrade" set IGNORE_UPGRADE=y
|
|
||||||
)
|
|
||||||
|
|
||||||
call "%VENV_DIR%\Scripts\activate.bat"
|
call "%VENV_DIR%\Scripts\activate.bat"
|
||||||
call pip -V
|
call pip -V
|
||||||
if not defined IGNORE_UPGRADE call pip install --upgrade -r %REQUIREMENTS_FILE%
|
if NOT [%1] == [--ignore-upgrade] call pip install --upgrade -r %REQUIREMENTS_FILE%
|
||||||
call python main.py
|
call python main.py
|
||||||
|
|||||||
Reference in New Issue
Block a user