Implement GPU environment verification in session management

- Added a new function `verify_gpu_env` to check GPU stack readiness, including nvidia-smi, CUDA, and torch in the Comfy virtual environment when SwarmUI is enabled.
- Updated the session management to call `verify_gpu_env`, capturing GPU environment status and errors in the state notes.
- Enhanced documentation in `cli.md` to reflect the new GPU environment verification process.
- Added tests for `verify_gpu_env` to ensure proper functionality and error handling during GPU checks.
This commit is contained in:
Leonid Pershin
2026-08-21 06:58:23 +03:00
parent 09b7c36f3b
commit 3c8225a69e
7 changed files with 488 additions and 14 deletions
+3 -2
View File
@@ -232,8 +232,9 @@ Application credential для idle-killer CLI создаёт на `up` (узко
1. Nova `ACTIVE`
2. TCP 22 / SSH
3. На VM: HTTP сервисов стека (SwarmUI `:7801` / Ollama `:11434` / llama.cpp `:8080`) — `verify_stack_on_vm`
4. Backend Idle (если SwarmUI) → toast (если `NOTIFY_READY`)
5. Туннель + проверка **localhost** тех же сервисов → access-card
4. На VM: **nvidia-smi / CUDA** (+ **torch+cuda** в Comfy venv, если SwarmUI) — `verify_gpu_env`
5. Backend Idle (если SwarmUI) → toast (если `NOTIFY_READY`)
6. Туннель + проверка **localhost** тех же сервисов → access-card
Локальный порт UI: **17801** (на VM по-прежнему 7801 на loopback).