Repository navigation
Build a new image out of an image and a user's state - #22
Merged
Merged
Conversation
Someone who registered trees, indexed them and recorded knowledge in a container could not hand that on: it lived in their state directory only. The launcher's new build option runs a tool of the image as root, with the state mounted read-only, then commits the container under the given tag. The tool adds the user's corpora to the image's registry, copies their collections into its index, vectors included, and adds the accepted knowledge to its common store. A corpus path under the user's home becomes relative to it, with its collection named, so the index follows a checkout at the same place under another home. The source trees are not copied. Naming a corpus on the launcher's command line only worked for the last one of the image: the lookup's exit status ended the script. It is fixed and the test now has two corpora.
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.
spear-run.sh --build TAGmakes a new image from the current one plus the user's state directory:The source trees are not copied. It runs
spear-bake-state, a tool of the image, as root in a container with the state mounted read-only, then commits it.Also fixes
--tree NAME, which only worked for the last corpus of an image: the lookup loop's exit status ended the script underset -e.Checked end to end on a test image: a tree registered and indexed in a container, the image built, then run from another home with an empty state and its own checkout: the corpus opens with its 3 chunks, and a shipped corpus still answers (4260 chunks). Unit tests for the three merges; the suite passes (4511 tests).