Update documentation and CLI behavior for GPU management
- Clarified the behavior of `Ctrl+C` and `Ctrl+D` in the README and other documentation, specifying that `Ctrl+C` only stops the tunnel while keeping the GPU active, and `Ctrl+D` stops the GPU while preserving disk data. - Enhanced the CLI documentation to reflect these changes, ensuring users understand the implications of these commands during GPU operations. - Improved the handling of data bindings and remounting logic in the codebase to prevent issues with empty model tabs in the UI. - Added tests to validate the new command behaviors and ensure proper documentation alignment.
This commit is contained in:
@@ -138,9 +138,34 @@ def test_swarm_diag_script_covers_api_and_journal():
|
||||
|
||||
text = files("gpu_rent.remote").joinpath("swarm_diag.py").read_text(encoding="utf-8")
|
||||
assert "ListBackends" in text
|
||||
assert "ListModels" in text
|
||||
assert "journalctl" in text
|
||||
assert ".gpu-rent-last-diag.txt" in text
|
||||
assert "nvidia-smi" in text
|
||||
assert "findmnt /opt/swarmui/Models" in text
|
||||
|
||||
|
||||
def test_ensure_binds_refuses_lazy_umount():
|
||||
from importlib.resources import files
|
||||
|
||||
sh = files("gpu_rent.remote").joinpath("ensure_binds.sh").read_text(encoding="utf-8")
|
||||
assert "umount -l" in sh # mentioned as forbidden
|
||||
assert 'umount -l "$dst"' not in sh
|
||||
assert "mount --bind" in sh
|
||||
assert "weights data=" in sh
|
||||
|
||||
comfy = files("gpu_rent.remote").joinpath("install_swarm_comfy.py").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert '"umount", "-l"' not in comfy
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
session = (Path(__file__).resolve().parents[1] / "src" / "gpu_rent" / "session.py").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert "umount -l" not in session
|
||||
assert "ensure_data_binds" in session
|
||||
|
||||
|
||||
def test_verify_gpu_env_fail_fast_empty_dlbackend(monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user