-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
58 lines (49 loc) · 1.51 KB
/
run.bat
File metadata and controls
58 lines (49 loc) · 1.51 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
@echo off
REM run.bat — Start RBIS on Windows (no Docker needed)
REM Requirements: Python 3.10+
setlocal
set PORT=8000
set SCRIPT_DIR=%~dp0
set BACKEND=%SCRIPT_DIR%backend
echo.
echo RBIS — Retail Behavior Intelligence System
echo ==========================================
echo.
REM Check Python
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python is not installed.
echo Download from https://python.org
pause
exit /b 1
)
REM Create virtualenv
if not exist "%SCRIPT_DIR%.venv" (
echo Creating virtual environment...
python -m venv "%SCRIPT_DIR%.venv"
)
call "%SCRIPT_DIR%.venv\Scripts\activate.bat"
REM Install dependencies
echo Installing dependencies...
pip install --quiet --upgrade pip
pip install --quiet -r "%BACKEND%\requirements.txt"
REM Create data dirs
if not exist "%SCRIPT_DIR%data\snapshots" mkdir "%SCRIPT_DIR%data\snapshots"
if not exist "%SCRIPT_DIR%data\clips" mkdir "%SCRIPT_DIR%data\clips"
if not exist "%SCRIPT_DIR%data\reports" mkdir "%SCRIPT_DIR%data\reports"
echo.
echo ==========================================
echo Dashboard: http://localhost:%PORT%
echo.
echo For phone access, find your IP address:
echo Settings > WiFi > your network > IP address
echo Then open: http://^<your-ip^>:%PORT%
echo ==========================================
echo.
REM Start backend
cd "%BACKEND%"
set DATABASE_URL=sqlite+aiosqlite:///%SCRIPT_DIR%data/rbis.db
set LOCAL_STORAGE_PATH=%SCRIPT_DIR%data
set PORT=%PORT%
uvicorn app.main:app --host 0.0.0.0 --port %PORT%
pause