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:
+21
-1
@@ -137,7 +137,27 @@ if want_swarm:
|
||||
})
|
||||
|
||||
if want_ollama:
|
||||
ok, detail = http_ok("http://127.0.0.1:11434/api/tags")
|
||||
try:
|
||||
req = urllib.request.Request("http://127.0.0.1:11434/api/tags", method="GET")
|
||||
with urllib.request.urlopen(req, timeout=5) as resp:
|
||||
raw = resp.read().decode("utf-8", "replace")
|
||||
payload = json.loads(raw)
|
||||
models = payload.get("models") if isinstance(payload, dict) else None
|
||||
names = []
|
||||
if isinstance(models, list):
|
||||
for m in models:
|
||||
if isinstance(m, dict) and m.get("name"):
|
||||
names.append(str(m["name"]))
|
||||
elif isinstance(m, str) and m.strip():
|
||||
names.append(m.strip())
|
||||
if names:
|
||||
preview = ", ".join(names[:3])
|
||||
extra = "" if len(names) <= 3 else f" +{len(names) - 3}"
|
||||
ok, detail = True, f"{len(names)} models ({preview}{extra})"
|
||||
else:
|
||||
ok, detail = False, "Ollama up, 0 models — Assistent dropdown empty; ollama pull"
|
||||
except Exception as exc:
|
||||
ok, detail = False, str(exc)[:160]
|
||||
checks.append({
|
||||
"name": "ollama",
|
||||
"ok": ok,
|
||||
|
||||
Reference in New Issue
Block a user