-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
79 lines (71 loc) · 2.33 KB
/
Copy pathsetup.bat
File metadata and controls
79 lines (71 loc) · 2.33 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
@echo off
echo ============================================
echo Meal Monitoring Dashboard - Setup
echo ============================================
echo.
:: Check Python
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python not found. Install Python 3.10+ from https://python.org
exit /b 1
)
:: Check Git
git --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Git not found. Install Git from https://git-scm.com
exit /b 1
)
:: Check HailoRT
hailortcli fw-control identify >nul 2>&1
if errorlevel 1 (
echo WARNING: Hailo device not detected. Install HailoRT from https://hailo.ai/developer-zone/
echo Setup will continue, but the app won't run without HailoRT.
echo.
)
:: Clone hailo-apps framework (pinned to v26.03.1)
if not exist "deps\hailo-apps" (
echo Cloning hailo-apps framework...
mkdir deps 2>nul
git clone --depth 1 --branch v26.03.1 https://github.com/hailo-ai/hailo-apps.git deps\hailo-apps
if errorlevel 1 (
echo Falling back to commit pin...
git clone https://github.com/hailo-ai/hailo-apps.git deps\hailo-apps
cd deps\hailo-apps
git checkout 891ce70
cd ..\..
)
) else (
echo hailo-apps already cloned, skipping.
)
:: Patch cython_bbox dependency (requires C++ compiler — use NumPy fallback instead)
echo Patching BYTETracker to remove C++ build dependency...
python patches\fix_cython_bbox.py
:: Create isolated virtual environment (no --system-site-packages to avoid version conflicts)
if not exist "venv" (
echo Creating virtual environment...
python -m venv venv
) else (
echo Virtual environment already exists, skipping.
)
:: Activate and install
echo Installing dependencies...
call venv\Scripts\activate.bat
pip install -e deps\hailo-apps
pip install pillow pygrabber
echo.
echo ============================================
echo Setup complete!
echo ============================================
echo.
echo IMPORTANT: Install the HailoRT Python wheel into this venv.
echo The wheel version MUST match your installed HailoRT runtime,
echo and the Python version (cp310, cp312, etc.) must match your Python.
echo.
echo venv\Scripts\activate
echo pip install path\to\hailort-X.XX.X-cpXXX-win_amd64.whl
echo.
echo To verify:
echo python -c "from hailo_platform import VDevice; print('OK')"
echo.
echo Then run: .\run.bat
echo.