-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_server.bat
51 lines (39 loc) · 904 Bytes
/
start_server.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@REM @echo off
git pull
set SD_URL=http://127.0.0.1:7860
echo does server_env\ exist
if exist server_env\ (
echo Yes
goto :activate_server_env
) else (
echo No
goto :create_server_env
)
:create_server_env
python -m venv server_env
@REM pause
:activate_server_env
::run a server
echo my_path: %~dp0
@REM set current_dir=
set VENV_DIR=%~dp0server_env
@REM cd ./server_env/Scripts/
set PYTHON="%VENV_DIR%\Scripts\Python.exe"
%PYTHON% -m pip install -r requirements.txt
cd ./server/python_server
echo python path: %PYTHON%
dir
echo %PYTHON% uvicorn serverMain:app --reload
%PYTHON% -m uvicorn serverMain:app --reload
pause
@REM exit /b
@REM %PYTHON% uvicorn serverMain:app --reload
pause
@REM %PYTHON% img2imgapi.py
@REM activate
@REM echo server_env %PYTHON%
@REM cd ./server/python_server
@REM %PYTHON% img2imgapi.py
@REM uvicorn serverMain:app --reload
@REM dir .
@REM call webui.bat