-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathstart_node.bat
More file actions
90 lines (77 loc) · 2.31 KB
/
start_node.bat
File metadata and controls
90 lines (77 loc) · 2.31 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
@echo off
echo InferNode Standalone Launcher
echo =============================
echo.
cd /d "%~dp0"
REM Detect Python executable
set PYTHON_EXE=python
if exist "..\.venv\Scripts\python.exe" (
set PYTHON_EXE="..\.venv\Scripts\python.exe"
echo Using virtual environment: .venv
) else if exist "..\venv311\Scripts\python.exe" (
set PYTHON_EXE="..\venv311\Scripts\python.exe"
echo Using virtual environment: venv311
) else if exist "..\venv\Scripts\python.exe" (
set PYTHON_EXE="..\venv\Scripts\python.exe"
echo Using virtual environment: venv
) else (
echo No virtual environment found, using system Python
)
:menu
echo.
echo Choose an option:
echo 1. Start with default settings (port 5555)
echo 2. Start with custom port
echo 3. Start with discovery disabled
echo 4. Start with telemetry enabled
echo 5. Custom configuration
echo 6. Exit
echo.
set /p choice="Enter choice (1-6): "
if "%choice%"=="1" goto default
if "%choice%"=="2" goto custom_port
if "%choice%"=="3" goto no_discovery
if "%choice%"=="4" goto with_telemetry
if "%choice%"=="5" goto custom
if "%choice%"=="6" goto exit
goto menu
:default
echo Starting with default settings...
%PYTHON_EXE% inference_node.py
goto end
:custom_port
set /p port="Enter port number (default 5555): "
if "%port%"=="" set port=5555
echo Starting on port %port%...
%PYTHON_EXE% inference_node.py --port %port%
goto end
:no_discovery
echo Starting with discovery disabled...
%PYTHON_EXE% inference_node.py --port 5555 --discovery false
goto end
:with_telemetry
echo Starting with telemetry enabled...
%PYTHON_EXE% inference_node.py --port 5555 --telemetry true
goto end
:custom
set /p port="Enter port (default 5555): "
set /p name="Enter node name (optional): "
set /p discovery="Enable discovery? (true/false, default true): "
set /p telemetry="Enable telemetry? (true/false, default false): "
if "%port%"=="" set port=5555
if "%discovery%"=="" set discovery=true
if "%telemetry%"=="" set telemetry=false
echo Starting with custom configuration...
if "%name%"=="" (
%PYTHON_EXE% inference_node.py --port %port% --discovery %discovery% --telemetry %telemetry%
) else (
%PYTHON_EXE% inference_node.py --port %port% --node-name "%name%" --discovery %discovery% --telemetry %telemetry%
)
goto end
:exit
echo Goodbye!
goto end
:end
echo.
echo Press any key to continue...
pause >nul