mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3974] [CLOSED] [Other] docker image: stage the nested tools/ scripts the Terminal bundle reads (build stops at "installer tool missing: tools/dsv41/tune.py") #4860
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4860
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3974
Author: @hurui200320
Created: 10/24/2026
Status: ❌ Closed
Base:
main← Head:docker-ctx-nested-tools📝 Commits (1)
04b7364docker: the build context carries the nested tools/ scripts the Terminal bundle reads (INSTALLER_SCRIPTS names dsv41/*, so the terminal stage stopped at "installer tool missing: tools/dsv41/tune.py" since v0.2.4.1); the context test checks every installer tool is staged📊 Changes
2 files changed (+15 additions, -2 deletions)
View changed files
📝
docker/build.sh(+5 -2)📝
tests/terminal/test_docker_files.py(+10 -0)📄 Description
Problem and result
Since v0.2.4.1 (
b7958c04),packaging/package_terminal.pybundles the DeepSeek installer scripts:INSTALLER_SCRIPTS(line 128) names the nested modulesdsv41/pack_gguf,dsv41/smoke,dsv41/tune, whichsetup.pyruns by path.docker/build.shfills the Docker build context'sterminal-src/withgit ls-files ... ':(glob)tools/*.py'— top-leveltools/modules only. Inside the image,package_terminal.pyruns on that context (docker/Dockerfileline 37) andadd_installer()→local_imports()stops with:Every image built from the v0.2.4.1 or v0.2.4.2 tree fails in the terminal stage this way, for every flavor (the context is flavor-independent). After this change the nested modules are in the context and the terminal stage completes; the image contents are unchanged otherwise —
add_installer()still decides what enters the Terminal bundle, the context only gains source files.Reproduced on
main7dd5cf18(identical to v0.2.4.2 in every file this PR touches):sh docker/build.sh --flavor cuda --engine <stub package> --ctx ... --ctx-only, thenpackage_terminal.local_imports()over the stagedterminal-src→SystemExit: installer tool missing: tools/dsv41/tune.py. With this change the same call passes and findsdsv41/pack_gguf,dsv41/smoke,dsv41/tune.Related discussion
None. Focused fix; no existing issue or PR covers it (searched open and closed). Not related to #3644 (root
Dockerfilesource build at v0.2.2): the root Dockerfile copies the whole tree (COPY . .), so onlydocker/build.sh's hand-written context list has this gap.Approach
docker/build.sh: widen the pathspec to':(glob)tools/**/*.py'. Git's:(glob)magic makes**match zero or more directories, so the top-level modules are still staged exactly as before (all 158 still match) andtools/dsv41/*.pynow reaches the context..gitfallback (source ZIP) used the shell globtools/*.py, top-level only; it now stagesfind tools -name '*.py'so both branches carry the same set.tests/terminal/test_docker_files.py:test_build_script_exits_zero_after_assembling_a_contextalready runsbuild.sh --ctx-onlyfor real; it now readsINSTALLER_TOOLSandINSTALLER_SCRIPTSfrompackage_terminal.py(ast, the way the sibling test readsPAYLOAD) and asserts everytools/<name>.pyis in the context. Against the pre-fix script it fails withbuild.sh did not copy tools/dsv41/pack_gguf.py into the context; with the fix it passes.Validation
Passed (branch
04b73643, Linux x86_64):sh -n docker/build.sh→ ok;shellcheck 0.11.0reports nothing on the changed lines (the file's pre-existingCDPATH=warnings remain).python -m pytest tests/terminal/test_docker_files.py -q→ 17 passed (host, Python 3.13).docker/build.shstashed to HEAD):test_build_script_exits_zero_after_assembling_a_contextfails withbuild.sh did not copy tools/dsv41/pack_gguf.py into the context; restored → 17 passed.docker/build.sh --flavor cuda --engine <stub> --ctx ... --ctx-only;tools/dsv41/{pack_gguf,smoke,tune}.pypresent;package_terminal.local_imports()over the stagedterminal-srcpasses..gittree: same sources staged without.git, itsdocker/build.sh --ctx-onlystagestools/dsv41/tune.py;local_imports()passes.Failed: none from this change.
Not run:
docker buildon this machine. The failing stage is the terminal stage, and the checks above are the exact inputs it reads. External evidence, not validation of this commit: hurui200320/llm-ops CI run 40100350366 (2026-10-24, success, commit2e44931) applied the same one-line pathspec change (via sed) to a v0.2.4.2 checkout —docker/,Dockerfileandpackage_terminal.pyare identical to this branch — and built and smoke-testedghcr.io/hurui200320/llm-ops-strata:0.2.4.2-rocm-gfx110x(Terminal version, component inventory,strata-dsv41).Limits
docker-images.yml'ssource_refinput pointed at the fixed commit (or a backport to the tag); later tags get the fix.findfallback assumes no whitespace intools/filenames, like the script's hand-written path list;git ls-files -- tools | grep -c ' '→ 0.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.