Port Windows installer/ncp fixes and a real nomic-embed-text default
- install-windows.ps1: warn about a leftover profile-based ncp() that would shadow ncp.cmd; the "press any key to close" footer now skips the wait when stdin is redirected (was hanging indefinitely) and exits cleanly instead of Stop-Process when it owns the window; pulls nomic-embed-text alongside the chat/memory models. - management/ncp.py: ncp start / start -b bring Ollama up automatically; longer timeout + real error message on a slow model warm. - synapse/nexus_config.py: DEFAULT_EMBED_MODEL, single source of truth alongside DEFAULT_CHAT_MODEL/DEFAULT_MEMORY_MODEL. - synapse/ollama_manager.py: is_available() cached instead of spawning a process per /status poll; is_running() timeout dropped 2s -> 0.5s so a healthy backend stops reading as dead; embed() reads the new default instead of a hardcoded string; de-duplicated serve-env setup. Ported via bin/publish.sh from NexusOS-jon. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+12
-5
@@ -304,14 +304,19 @@ def stop_service(svc: Service) -> bool:
|
||||
def start_ollama() -> None:
|
||||
"""Driven through the backend endpoint (the path the control panel uses)
|
||||
rather than launching the binary, because OllamaManager owns model and GPU
|
||||
selection. Requires the backend to be up."""
|
||||
selection. Requires the backend to be up.
|
||||
|
||||
Long timeout: the endpoint blocks until the model is warmed - weights read
|
||||
off disk into RAM/VRAM - which the web UI's own "Loading model..." button
|
||||
state calls out as routinely taking about a minute, not just the Ollama
|
||||
process launching."""
|
||||
print("Starting OLLAMA...")
|
||||
req = urllib.request.Request("http://localhost:8000/ollama/start", method="POST")
|
||||
try:
|
||||
urllib.request.urlopen(req, timeout=30).read(1)
|
||||
urllib.request.urlopen(req, timeout=180).read(1)
|
||||
print("NEXUS OLLAMA STARTED")
|
||||
except Exception:
|
||||
print(" OLLAMA start request failed (backend not reachable on :8000)")
|
||||
except Exception as e:
|
||||
print(f" OLLAMA start failed: {e}")
|
||||
|
||||
|
||||
def stop_ollama() -> None:
|
||||
@@ -339,6 +344,7 @@ def cmd_start(target) -> None:
|
||||
launch(SERVICES["memory"]); wait_for_port(SERVICES["memory"])
|
||||
elif target in ("--backend", "-b"):
|
||||
launch(SERVICES["backend"]); wait_for_port(SERVICES["backend"])
|
||||
start_ollama()
|
||||
elif target in ("--frontend", "-f"):
|
||||
launch(SERVICES["frontend"]); wait_for_port(SERVICES["frontend"])
|
||||
elif target in ("--ai", "-a"):
|
||||
@@ -349,6 +355,7 @@ def cmd_start(target) -> None:
|
||||
launch(SERVICES["backend"])
|
||||
wait_for_port(SERVICES["memory"])
|
||||
wait_for_port(SERVICES["backend"])
|
||||
start_ollama()
|
||||
launch(SERVICES["frontend"])
|
||||
wait_for_port(SERVICES["frontend"])
|
||||
else:
|
||||
@@ -656,7 +663,7 @@ Commands:
|
||||
--memory, -m Start only the memory service
|
||||
--frontend,-f Start only the frontend
|
||||
--backend, -b Start only the backend
|
||||
--ai, -a Start the AI (Ollama) — manual; not started by default
|
||||
--ai, -a Start only the AI (Ollama); `start`/`start -b` already include it
|
||||
|
||||
stop Stop ALL Nexus services
|
||||
--memory, -m Stop only the memory service
|
||||
|
||||
Reference in New Issue
Block a user