78 lines
2.0 KiB
Batchfile
78 lines
2.0 KiB
Batchfile
@echo off
|
|
echo Recompiling LightRAG WebUI...
|
|
echo.
|
|
|
|
:: Check if Python is available
|
|
python --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo ERROR: Python is not available in PATH
|
|
echo Please ensure Python is installed and added to system PATH
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
:: Install/update dependencies
|
|
echo Step 1: Installing/updating dependencies...
|
|
pip install -r requirements.txt
|
|
|
|
:: Install spaCy model if not present
|
|
echo.
|
|
echo Step 2: Checking spaCy model...
|
|
python -c "import spacy; spacy.load('en_core_web_sm')" >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo Installing spaCy English model...
|
|
python -m spacy download en_core_web_sm
|
|
) else (
|
|
echo spaCy model already installed
|
|
)
|
|
|
|
:: Verify GPU support - skip if script missing
|
|
echo.
|
|
echo Step 3: Verifying GPU support...
|
|
if exist verify_gpu_support.py (
|
|
python verify_gpu_support.py
|
|
) else (
|
|
echo Skipping GPU verification (script not found)
|
|
)
|
|
|
|
:: Test database connections - skip if script missing
|
|
echo.
|
|
echo Step 4: Testing database connections...
|
|
if exist test_database_connections.py (
|
|
python test_database_connections.py
|
|
) else (
|
|
echo Skipping database connection test (script not found)
|
|
)
|
|
|
|
:: Run quick system test - skip if script missing
|
|
echo.
|
|
echo Step 5: Running system validation...
|
|
if exist simple_production_test.py (
|
|
python simple_production_test.py
|
|
) else (
|
|
echo Skipping system validation (script not found)
|
|
)
|
|
|
|
:: Step 6: Build web UI
|
|
echo.
|
|
echo Step 6: Building web UI...
|
|
if exist "LightRAG-main\lightrag_webui\package.json" (
|
|
cd LightRAG-main\lightrag_webui
|
|
echo Using npm to build web UI...
|
|
call npm run build-no-bun
|
|
cd ..\..
|
|
echo Web UI build completed.
|
|
) else (
|
|
echo Web UI source not found, using pre-built assets.
|
|
)
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo WebUI compilation and setup complete!
|
|
echo.
|
|
echo To start the server, run: zrun.bat
|
|
echo WebUI will be available at: http://localhost:3015
|
|
echo ========================================
|
|
echo.
|
|
|
|
pause |