[PR #5116] [Other] Docker: DRAFTING chooses the drafter (auto, mtp, dflash2, off) #5311

Open
opened 2026-11-07 16:34:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 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 launch screen except Drafting, so a container user cannot choose MTP or DFlash2 without a shell in the container. This adds DRAFTING (auto, mtp, dflash2, off). The entry point passes it to launch --drafting and saves it in the preset, as it does for KV or VISION. 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.
  • The three compose files pass 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 in sh: 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=DFLASH2 reaches the launch line as --drafting dflash2 with --save-preset, and without it a saved preset is reused and not rewritten.

Failed:

  • test_a_file_already_in_the_new_place_is_never_overwritten fails the same way on v0.2.10 (16 of 17 there). I didn't look into why.

Not run: the full tests/terminal suite 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 starts strata serve --profile and 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.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/5116 **Author:** [@Joe11221](https://github.com/Joe11221) **Created:** 11/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docker-drafting-env` --- ### 📝 Commits (1) - [`58a4015`](https://github.com/Niko1221/Strata/commit/58a401521baa4cd75411126f2a628f545ed64537) [Other] Docker: DRAFTING chooses the drafter (auto, mtp, dflash2, off) ### 📊 Changes **7 files changed** (+71 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 Description ## Problem and result The Docker entry point has a variable for each `strata launch` screen except Drafting, so a container user cannot choose MTP or DFlash2 without a shell in the container. This adds `DRAFTING` (`auto`, `mtp`, `dflash2`, `off`). The entry point passes it to `launch --drafting` and saves it in the preset, as it does for `KV` or `VISION`. 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. - The three compose files pass `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 in `sh`: 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=DFLASH2` reaches the launch line as `--drafting dflash2` with `--save-preset`, and without it a saved preset is reused and not rewritten. Failed: - `test_a_file_already_in_the_new_place_is_never_overwritten` fails the same way on `v0.2.10` (16 of 17 there). I didn't look into why. Not run: the full `tests/terminal` suite 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 starts `strata serve --profile` and 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5311
No description provided.