Repository navigation
scripts: bootstrap-buildhost.sh — turn a checkout into a build host - #11
Merged
Merged
Conversation
spear-image build reuses the staging scripts, which run python3 from the PATH to read the corpus index; so a checkout cannot build an image until it has three machine-local things the repo does not carry: a client venv, a corpus registry (client/projects.json) and a prebuilt index (client/chromadb). This sets them up idempotently. The default venv installs only chromadb -- the one dependency the staging scripts import, enough to build from an existing index; --full installs requirements.txt (for indexing or native spear-chat), though torch stays manual (CUDA-specific). --index-from copies an index, --projects copies a registry; the index is never built here (hours of GPU embedding) -- spear-corpus / reindex do that, or a copy. Ends by importing chromadb from the venv and saying whether a build would find everything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
spear-image buildreuses the staging scripts, which runpython3from the PATH to read the corpus index. A fresh checkout therefore cannot build an image until it has three machine-local things the repo deliberately does not carry: a client venv, a corpus registry (client/projects.json) and a prebuilt index (client/chromadb). Setting those up by hand is fiddly and easy to get subtly wrong (which python, which chromadb version, where the index goes).This makes "fresh clone → build host" a documented, idempotent one-liner — so a colleague can stand up their own build host on their own machine.
What it does
chromadb(pinned fromrequirements.txt) — the single dependency the staging scripts import, enough to build from an existing index.--fullinstallsdeploy/requirements.txt(for building an index or nativespear-chat); torch stays manual (CUDA-specific, per the note in requirements.txt).--projects FILEcopies one intoclient/projects.json; otherwise reports it missing (spear-corpus addwrites it).--index-from DIRcopies an existingchromadb; the index is never built here (hours of GPU embedding) —spear-corpus add --autoindex//reindexdo that, offloading viaSPEAR_EMBED_REMOTE.--force), ends by importing chromadb from the venv and reporting whether a build would find everything.Notes
chromadb+ stdlib — verified — which is why the build-only venv is correct and light.local.conf; points the operator atspear-configureandlocal.conf.exampleforPATH/SPEAR_ENTITY/SPEAR_COMMONS/registry.