@@ -20,7 +20,7 @@ if %errorlevel% neq 0 (
2020
2121 where wsl > nul 2 > nul
2222 if %errorlevel% neq 0 (
23- call : ColorText 0C " ERROR: WSL is still not installed. Aborting deployment."
23+ echo ERROR: WSL is still not installed. Aborting deployment.
2424 exit /b 1
2525 )
2626)
@@ -32,9 +32,13 @@ if %errorlevel% neq 0 (
3232 set /p DUMMY = " Waiting for user to install usbipd and click Done..."
3333
3434 where usbipd > nul 2 > nul
35- if %errorlevel% neq 0 (
36- call :ColorText 0C " ERROR: usbipd is still not installed. Aborting deployment."
37- exit /b 1
35+ if !errorlevel! neq 0 (
36+ if exist " C:\Program Files\usbipd-win\usbipd.exe" (
37+ set " PATH = %PATH% ;C:\Program Files\usbipd-win\"
38+ ) else (
39+ echo ERROR: usbipd is still not installed. Aborting deployment.
40+ exit /b 1
41+ )
3842 )
3943)
4044
5458echo [2/4] Initializing WSL Python 3.9 environment...
5559wsl -u root -e bash -c " apt-get update && apt-get install -y software-properties-common curl wget libusb-1.0-0 && add-apt-repository -y ppa:deadsnakes/ppa && apt-get update && apt-get install -y python3.9 python3.9-venv python3.9-distutils"
5660if %errorlevel% neq 0 (
57- call : ColorText 0C " ERROR: Failed to install Python 3.9 in WSL. Ensure you have internet access and WSL is running Ubuntu."
61+ echo ERROR: Failed to install Python 3.9 in WSL. Ensure you have internet access and WSL is running Ubuntu.
5862 exit /b 1
5963)
6064
@@ -63,26 +67,20 @@ echo.
6367echo [3/4] Creating Virtual Environment...
6468wsl -e bash -c " cd '%DIR_PATH% ' && python3.9 -m venv wsl_venv"
6569if %errorlevel% neq 0 (
66- call : ColorText 0C " ERROR: Failed to create venv."
70+ echo ERROR: Failed to create venv.
6771 exit /b 1
6872)
6973
7074:: 7. Install Python Packages and EdgeTPU Lib
7175echo .
72- echo [4/4] Installing tflite-runtime and Coral TPU drivers...
73- wsl -e bash -c " cd '%DIR_PATH% ' && source wsl_venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.9 && python3.9 -m pip install tflite-runtime==2.14.0 numpy pillow "
76+ echo [4/4] Installing Python requirements and Coral TPU drivers...
77+ wsl -e bash -c " cd '%DIR_PATH% ' && source wsl_venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.9 && python3.9 -m pip install -r requirements.txt "
7478wsl -u root -e bash -c " cd '%DIR_PATH% ' && wget -qO libedgetpu.deb https://packages.cloud.google.com/apt/pool/coral-edgetpu-stable/libedgetpu1-max_16.0_amd64_0ac21f1924dd4b125d5cfc5f6d0e4a5e.deb && dpkg -x libedgetpu.deb ext && cp ext/usr/lib/x86_64-linux-gnu/libedgetpu.so.1.0 libedgetpu.so.1 && rm -rf ext libedgetpu.deb"
7579
7680echo .
77- call :ColorText 0A " SUCCESS: Windows WSL Deployment Complete!"
81+ echo .
82+ echo SUCCESS: Windows WSL Deployment Complete!
7883echo .
7984echo Aegis-AI is ready to trigger the detection node natively on WSL!
8085echo You can safely close this terminal.
8186exit /b 0
82-
83- :ColorText
84- < nul set /p " . = %DEL% " > " %~2 "
85- findstr /v /a:%1 /R " ^$" " %~2 " nul
86- del " %~2 " > nul 2 >& 1
87- echo .
88- goto :eof
0 commit comments