Virtual-LPU / README.md
karimshahi's picture
Upload 35 files
a93cf7a verified
|
Raw History Blame
2.54 kB
# LPU AI Accelerator V7.2
AI-accelerator control center: FastAPI server + dashboard + native desktop
window, started from a single entry point. Server/monitoring processes are
completely independent of any training process — starting, stopping or
closing this app NEVER touches training.
## Quick start
```powershell
python -m venv .venv ; .\.venv\Scripts\activate
pip install -r requirements.txt
python run_lpu.py # server + dashboard in the browser
```
or double-click the .cmd launchers (they call python.exe explicitly, so a
broken .py file association cannot swallow the invocation — the fix for the
Electron/Chromium incident):
| Launcher | Action |
|---|---|
| `LPU_Desktop.cmd` | native window (pywebview; honest browser fallback with reason) |
| `LPU_Server.cmd` | server + dashboard in the system browser |
| `LPU_Check.cmd` | environment self-check — starts nothing, safe anytime |
CLI: `python run_lpu.py [--desktop] [--no-browser] [--port 8710]
[--host 127.0.0.1] [--config configs\lpu_config_v7.yaml] [--check]`.
## Layout
```
run_lpu.py single entry point (all modes)
desktop_app.py native desktop app (3 modes, port scan, honest fallback)
run_lpu_desktop.py PyInstaller target
server/app.py FastAPI: / (dashboard) /api/status (JSON)
lpu/version.py version identity (7.2.0)
lpu/cli/self_check.py --check report (PASS/WARN/SKIP, never fabricated)
frontend/dashboard.html served at / — polls /api/status every 2 s
configs/lpu_config_v7.yaml default config (documented defaults only)
tests/ 22 tests (server lifecycle, attach detection,
fallback routing, launcher plumbing, 7.2 fixes)
docs/PHASE1_AUDIT/ 6 audit reports (source, architecture, dependency
map, roadmap, risks, coverage) — read them before
extending; every claim was executed, not assumed.
```
## Guarantees
- Loopback by default; a non-loopback `--host` is your explicit decision
(token middleware is PHASE 3 — see docs/PHASE1_AUDIT/DEVELOPMENT_ROADMAP.md).
- Attach mode never stops the other process's server; closing the window
stops only the server this app owns.
- No pywebview or window failure → honest browser fallback, reason printed.
- `LPU_Check.cmd` reports the environment truthfully, including what is
missing and how to enable it.
## Tests
```powershell
python -m pytest tests -q # 21 passed, 1 skipped (native window = display-gated)
```