Skip to content

The container builds its own models; the Settings build button follows the host plan - #207

Merged
Randomname653 merged 2 commits into
mainfrom
feat/container-autobuild
Oct 23, 2026
Merged

Randomname653 merged 2 commits into
mainfrom
feat/container-autobuild

Conversation

@Randomname653

Copy link
Copy Markdown
Owner

Why: start.bat checks and builds the models before the desktop server starts. The container starts the server directly, so a fresh NAS install came up with no bakes until someone opened a shell. Don, rightly: that's nonsense for a container.

services/model_autobuild.ensure_main_models

  • When: with AUTO_BUILD_MODELS (set in the Dockerfile), the lifespan starts it in the background on a configured install.
  • What: builds what the main host is missing, from host_plan("main"). The server answers right away; a first build is 20+ GB, far past any health check.
  • Logging: what it builds, and what failed (ERROR). A split install's PC bakes that are missing are only named, never pulled onto the gaming PC unasked.
  • Embedding identity: reports it, and logs ERROR on a weights mismatch.
  • Never raises. Model calls fail closed until the bakes exist, as before.

Also

  • setup_wizard.build_ollama_models(embed_model=): callers on the event loop pass the model, so no database read happens on the loop.
  • The Settings "build models" button (/api/setup/build-models) follows host_plan("main"): no 17.7 GB pitcher on a split install's NAS, and the host's own window.
  • docs/NAS_MOVE.md step 6: start the container and watch the log, instead of a manual build.

Tests: new tests/test_model_autobuild.py (13 checks):

  • the four outcomes: Ollama down, nothing missing, build with the plan (embed model passed), failed build
  • the split PC only named
  • mismatch is an ERROR; never raises
  • the wiring: lifespan, flag default off with the Dockerfile on, the button

test_agent_only follows the reworded runbook. The full battery is green (228/228).

🤖 Generated with Claude Code

Randomname653 and others added 2 commits October 23, 2026 16:19
…s the host plan

start.bat checks and builds the models before the desktop server starts.
The container starts the server directly, so a fresh NAS install came up
with no bakes until someone opened a shell.

- services/model_autobuild.ensure_main_models: with AUTO_BUILD_MODELS (set
  in the Dockerfile), the lifespan starts it in the background on a
  configured install. It builds what the main host is missing from
  host_plan("main") while the server already answers; a first build is
  20+ GB, past any health check.
  - It logs what it builds and what failed (ERROR), and names a split PC's
    missing bakes without pulling them onto it.
  - It reports the embedding identity (ERROR on a weights mismatch).
  - It never raises.
- setup_wizard.build_ollama_models(embed_model=): callers on the event
  loop pass the model, so no database read happens there.
- routers/setup build_models_endpoint follows host_plan("main"): no
  pitcher on a split install's NAS, and the host's own window.
- docs/NAS_MOVE.md step 6: start the container and watch the log, no
  manual build.

New tests/test_model_autobuild.py (13 checks). Battery 228/228.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NAS_MOVE.md step 6 now quotes the container log line ('embedding weights
match the stored vectors').

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Randomname653
Randomname653 merged commit 1d40dca into main Oct 23, 2026
9 of 10 checks passed
@Randomname653
Randomname653 deleted the feat/container-autobuild branch October 23, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant