Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

docker: the build context carries the nested tools/ scripts the Terminal bundle reads (#3974)

天空Blondd398f353252a
diff --git a/docker/build.sh b/docker/build.sh
index bba83ff2e..3048b8bce 100755
--- a/docker/build.sh
+++ b/docker/build.sh
@@ -61,14 +61,17 @@ commit=${STRATA_BUILD_COMMIT:-$(git -C "$repo" rev-parse HEAD 2>/dev/null || tru
case "$commit" in *[!0-9a-f]*|"") commit="" ;; esac
# 1. the Terminal's sources: exactly what packaging/package_terminal.py copies (the working tree, so local edits are in the image)
+# tools/: every .py at any depth, because the bundle's DeepSeek scripts are nested (INSTALLER_SCRIPTS in package_terminal.py names dsv41/*:
+# the Dockerfile's terminal stage stops at "installer tool missing: tools/dsv41/tune.py" when only the top-level modules are in the context)
cd "$repo"
paths="packaging bin strata.py strata_control strata_cli serve requirements.txt requirements-monitor.txt docs/MANAGEMENT_PROTOCOL.md docs/TERMINAL_LAUNCH.md data bench/prompts/standard-v1 setup.py ref/load.py CMakeLists.txt"
if git rev-parse --git-dir >/dev/null 2>&1; then
# shellcheck disable=SC2086
- { git ls-files -z -- $paths ':(glob)tools/*.py'; } | tar --null -T - -cf - | tar -xf - -C "$ctx/terminal-src"
+ { git ls-files -z -- $paths ':(glob)tools/**/*.py'; } | tar --null -T - -cf - | tar -xf - -C "$ctx/terminal-src"
else
+ tools_py=$(find tools -name '*.py') # nested too: the bundle's dsv41 scripts live in tools/dsv41/
# shellcheck disable=SC2086
- tar -cf - --exclude='__pycache__' $paths tools/*.py | tar -xf - -C "$ctx/terminal-src"
+ tar -cf - --exclude='__pycache__' $paths $tools_py | tar -xf - -C "$ctx/terminal-src"
fi
# 2. the engine package(s): hard-linked when on the same file system (no second copy of GBs), copied otherwise
diff --git a/tests/terminal/test_docker_files.py b/tests/terminal/test_docker_files.py
index 0792d65ff..a51cee8a6 100644
--- a/tests/terminal/test_docker_files.py
+++ b/tests/terminal/test_docker_files.py
@@ -54,6 +54,16 @@ class Scripts(unittest.TestCase):
self.assertTrue((ctx / "Dockerfile").is_file())
self.assertTrue((ctx / "terminal-src" / "docs" / "TERMINAL_LAUNCH.md").is_file())
self.assertTrue((ctx / "engine" / "pkg" / "engine-component.json").is_file())
+ # the bundle reads tools/ modules by path as well (INSTALLER_SCRIPTS), and the DeepSeek ones are nested: every name must be in the
+ # context, or package_terminal.py stops the build at "installer tool missing: tools/<name>.py" (the image build after v0.2.4.1 was broken this way)
+ pt = ast.parse((ROOT / "packaging" / "package_terminal.py").read_text(encoding="utf-8"))
+ tools: set[str] = set()
+ for node in pt.body:
+ if isinstance(node, ast.Assign) and any(getattr(t, "id", "") in ("INSTALLER_TOOLS", "INSTALLER_SCRIPTS") for t in node.targets):
+ tools.update(ast.literal_eval(node.value))
+ self.assertTrue({"dsv41/pack_gguf", "dsv41/tune"} <= tools) # the nested ones this assertion exists for
+ for name in sorted(tools):
+ self.assertTrue((ctx / "terminal-src" / "tools" / f"{name}.py").is_file(), f"build.sh did not copy tools/{name}.py into the context")
def test_scripts_use_unix_line_ends(self):
for name in ("entrypoint.sh", "strata-wrapper.sh", "healthcheck.sh", "build.sh", "publish.sh"):