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:
@@ -48,6 +48,18 @@ def _mock_bind(monkeypatch):
|
||||
)
|
||||
monkeypatch.setattr("gpu_rent.session.provision_vm", lambda cfg, host, log, **kw: None)
|
||||
monkeypatch.setattr("gpu_rent.session.wait_backend_idle", lambda cfg, host, log, **kw: None)
|
||||
monkeypatch.setattr(
|
||||
"gpu_rent.session.verify_stack_on_vm",
|
||||
lambda cfg, host, log, **kw: [],
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"gpu_rent.session.verify_gpu_env",
|
||||
lambda cfg, host, log, **kw: [],
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"gpu_rent.session.tune_swarm_perf",
|
||||
lambda cfg, host, log: False,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"gpu_rent.session.ensure_boot_snapshot",
|
||||
lambda conn, boot_volume_id, cfg, log: None,
|
||||
|
||||
Reference in New Issue
Block a user