Repository navigation
[Other] docker image: stage the nested tools/ scripts the Terminal bundle reads (build stops at "installer tool missing: tools/dsv41/tune.py") - #3974
Closed
hurui200320 wants to merge 1 commit into
Conversation
…nal 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
Niko1221
pushed a commit
that referenced
this pull request
Oct 27, 2026
…nal bundle reads (#3974) docker/build.sh staged only top-level tools/*.py, so the Terminal stage stopped at 'installer tool missing: tools/dsv41/tune.py'. Ported from PR #3974 by hurui200320: the pathspec is tools/**/*.py, the no-.git fallback finds nested files, and the context test reads INSTALLER_TOOLS and INSTALLER_SCRIPTS from packaging/package_terminal.py. Fixes the failure that images built from v0.2.4.1 and v0.2.4.2 had.
Owner
|
Thanks. Confirmed on main: the build context only carries top-level tools/*.py, so the Terminal stage stops at tools/dsv41/tune.py. Ported with your authorship and your test to 0.2.7. Fixed in 0.2.7. Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7 |
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.
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.