From 297e613e71fa0d7c7130cf66492fa826cb429615 Mon Sep 17 00:00:00 2001 From: Viktor Antropov Date: Thu, 5 Nov 2026 14:02:40 +0300 Subject: [PATCH] fix_kit.bat: fill kit\site + start all + live checks in one run --- delivery/fix_kit.bat | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 delivery/fix_kit.bat diff --git a/delivery/fix_kit.bat b/delivery/fix_kit.bat new file mode 100644 index 0000000..5c7a3a7 --- /dev/null +++ b/delivery/fix_kit.bat @@ -0,0 +1,41 @@ +@echo off +REM One-shot fix: fill kit\site (python deps) + start everything + show live checks +cd /d %~dp0 +title fix-kit + +set "KIT=%~dp0..\..\kit" +echo === 1. kit python present? +if not exist "%KIT%\Python312\python.exe" ( + echo kit\Python312 is MISSING - run install_kit_transfer.bat under the installer account first + pause + exit /b 1 +) +echo OK + +echo === 2. python deps -> kit\site... +"%KIT%\Python312\python.exe" -m pip install --target "%KIT%\site" -r "%~dp0requirements.txt" 2>nul || ( + "%KIT%\Python312\python.exe" -m pip install --target "%KIT%\site" -r "%~dp0..\requirements.txt" +) || ( + echo ERROR: pip failed - probably no write access to kit (run this under the installer account, + echo or give rights: icacls C:\docchecker\app\kit /grant Users:(OI)(CI)M /T + pause + exit /b 1 +) +"%KIT%\Python312\python.exe" -c "import fastapi, uvicorn, httpx, docx, openpyxl, pptx; print('deps OK')" + +echo === 3. starting everything (ollama, LT, checker)... +call "%~dp0start_all.bat" + +echo === 4. live checks - wait a moment first... +timeout /t 12 /nobreak >nul +curl -s --max-time 8 -o nul -w "LT 8010: %%{http_code}" http://127.0.0.1:8010/v2/languages +echo. +curl -s --max-time 8 -o nul -w "LLM 11434: %%{http_code}" http://127.0.0.1:11434/v1/models +echo. +curl -s --max-time 8 http://127.0.0.1:8011/api/health +echo. +ollama list 2>nul +echo. +echo === если выше видно: LT 200 / LLM 200 / health с exceptions - всё работает. +echo === страничка: открыть 127.0.0.1:8011 (Ctrl+F5, если уже открыта) +pause \ No newline at end of file