mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5116] [Other] Docker: DRAFTING chooses the drafter (auto, mtp, dflash2, off) #5311
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#5311
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/5116
Author: @Joe11221
Created: 11/3/2026
Status: 🔄 Open
Base:
main← Head:docker-drafting-env📝 Commits (1)
58a4015[Other] Docker: DRAFTING chooses the drafter (auto, mtp, dflash2, off)📊 Changes
7 files changed (+71 additions, -2 deletions)
View changed files
📝
docker/compose/docker-compose.amd.yml(+1 -0)📝
docker/compose/docker-compose.intel.yml(+1 -0)📝
docker/compose/docker-compose.nvidia.yml(+1 -0)📝
docker/entrypoint.sh(+9 -0)📝
docs/DOCKER.md(+1 -0)📝
tests/terminal/test_docker_files.py(+37 -1)📝
tools/test_docker_entrypoint.py(+21 -1)📄 Description
Problem and result
The Docker entry point has a variable for each
strata launchscreen except Drafting, so a container user cannot choose MTP or DFlash2 without a shell in the container. This addsDRAFTING(auto,mtp,dflash2,off). The entry point passes it tolaunch --draftingand saves it in the preset, as it does forKVorVISION. Unset or empty, the launch arguments are the same as before.Approach
docker/entrypoint.sh: the value is lower-cased and checked. A value outside the four stops the start with exit code 2 and a one-line message, so a typo never falls back to Auto without anyone noticing.docs/DOCKER.md: one row in the settings table.DRAFTING: ${DRAFTING:-}.What the choice does once it reaches the launcher is unchanged: the launcher already decides, falls back and says why.
Validation
Passed:
python -m pytest tests/terminal/test_docker_files.py(Windows, Python 3.14): 24 passed. Three new tests run the entry point's block insh: each choice is passed on in lower case, unset or empty adds nothing, and a wrong value stops with code 2.python3 tools/test_docker_entrypoint.py(Ubuntu 24.04): 18 of 19. The two new tests pass:DRAFTING=DFLASH2reaches the launch line as--drafting dflash2with--save-preset, and without it a saved preset is reused and not rewritten.Failed:
test_a_file_already_in_the_new_place_is_never_overwrittenfails the same way onv0.2.10(16 of 17 there). I didn't look into why.Not run: the full
tests/terminalsuite on this branch (it changes no Python outside the two test files; the suite collects 2,554 tests without errors), building the images, and starting a real container with the variable through this entry point. My own container startsstrata serve --profileand skips the entry point.Limits
The variable only chooses; whether DFlash2 can run for that model, card and number of requests is still the launcher's decision.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.