mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3421] [Other] Docker 0.2.x: no way to run the engine without the strata launch wrapper (re-downloads existing GGUFs, forces an API key) #1385
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#1385
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?
Originally created by @nullata on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3421
Area
[Other] (setup and installation: the Docker image's entrypoint)
Desktop app, Terminal or source?
Docker
What happened
I run Strata as a backend for an orchestrator. The orchestrator manages model files, ports, auth, GPU assignment, restarts and the UI. All it needs from Strata is: here are the weights, serve them on a port.
The 0.1.x image did that. After rebuilding from
main(0.2.x), a container started with the GGUF shards already mounted where 0.1.x read them (/data/models/<tag>/<original name>) ignored them and started downloading the model again. The download is ~70-110 GB. There was no "files not found" error. It just downloaded.docs/DOCKER.mdnow says "The old volume layout (/data/config,/data/models) is not read". That was documented after the fact under "From the older image", with no deprecation period. If you pass noMODEL, the image picks a model on its own and downloads that too.Expected: an inference server never fetches tens of gigabytes because a path moved. It fails loudly instead.
The re-download is the part I saw. The rest of this report comes from reading the 0.2.x source to work out why. Those items are unconfirmed static analysis, marked as such, with file references. They all have the same cause: the 0.2.x image makes
strata launch(a desktop/TUI flow with presets, tuning, access modes, key generation, a status loop and its own downloader) the only door into the engine, and none of it can be turned off.1. Mandatory API key, enforced twice
serve/server.pyalready has everything a keyless private deployment needs: Host-header allow-listing viaallowed_hosts/STRATA_ALLOWED_HOSTS, origin checks against DNS rebinding, and/healthoutside the auth gate. Then its ownmain()refuses to use any of it beyond loopback:That's reproduced: a bare-metal
setup.shrun that finished with "no API key set: anyone on your network can use it" was then refused by the server on start. Setup and server disagree with each other.strata_cli/cli.py_launch_plan()enforces the same rule a second time:docker/entrypoint.shhard-codes--access lan. So inside a container, where a loopback-only server can't be reached at all, a key is always required. If you don't give one, it makes one up and stores it in the volume (/data/state/api-key). Going by the code, any client that doesn't send that key gets401.A container on an internal Docker network behind a proxy that does its own auth doesn't need a second key, and that isn't Strata's decision to make. The server already has the right primitive (
STRATA_ALLOWED_HOSTS), and then refuses to let you use it anywhere it would matter. The only way to run it keyless in a container is to bind it to loopback and put a TCP relay in front of it, which is exactly what I'm doing now. That isn't more secure than allowing a keyless bind with an allow-list. It just adds a hop.2. The 0.1.x env vars were dropped without a replacement (from
docs/DOCKER.mdandentrypoint.sh)HOST,LOW_RAM,REINSTALL,LAYER_SPLIT,RESIDENT_BUDGET_GIB,KV_STREAMINGandCONFIGare now "ignored with a warning".REINSTALL=1was the only explicit way to rebuild a model's config after changing context, vision, KV or low-RAM. What replaced it is presets: state saved in the volume that decides which settings win. The entrypoint even deletes your run configs whenGPU/GPUSchanges, becauselaunch --gpuotherwise doesn't apply to a model that's already set up.LOW_RAMmatters because setup reads the host's/proc/meminfoand not the cgroup limit. That's still true (the entrypoint now only warns about a memory limit), and the override is gone from the image's interface.setup.py --low-ramitself still exists.Warning about an env var and then ignoring it is not a migration path. Either honour them for a release or refuse to start.
3. The container polices its own lifecycle (unconfirmed static analysis)
docker/entrypoint.shruns a loop that callsstrata launch --statusevery 10 s and exits after three misses. Liveness belongs to the orchestrator (Docker healthchecks, k8s probes, or whatever started the container), not a shell loop inside it. I haven't seen it fire. But nothing in the loop distinguishes "server gone" from "status probe slow", and with one request at a time and long prefills, that difference matters.4. Presets, tuning, model "recommendation", access modes, key files
PRESET,TUNE/RETUNE, "Strata picks the model it recommends for this card",--access local|lan|cloudflare|tailscale,--save-preset,/data/state/api-key. These are desktop-app features. In a container they're state the operator didn't ask for, can't see withoutdocker exec, and that can change behaviour from one start to the next.5. Internals moved with no stable surface
setup.pymoved from/opt/stratato/opt/strata/terminal, and its tables gained families that don't fit their previous shape ("ready": Truewith nohf/file; single-filegyrowithout{i}). That's fair game for internals. But there is no supported machine-readable alternative for an integrator (a catalogue command, a structured setup-progress file), so integrators scrape, and break.Is Strata an engine or an appliance?
Strata currently presents itself as three things at once:
serve/server.pyand the engine component): fast, careful, with a sane security model.setup.py): reasonable as a one-shot tool.strata launch, presets, tuning, access modes, generated keys, self-supervision).The 0.2.x Docker image makes (3) the only door into (1). That's the wrong way round for a container image, whose users are by definition operators who already run something on top of it.
What makes this worse: everything an operator needs is still in the image.
setup.py --setup --yes --no-start --gguf-dir ... --low-ram ...still accepts every option the wrapper drops.serve/server.py --engine strata --config ...runs fine on its own (keyless only on loopback, see 1). Andentrypoint.shpasses through any command that isn'trun. The engine was never the problem. The wrapper is the problem, because it's the only supported way in.What would fix it
In order of preference:
docker run strata serveorMODE=engine. It runs setup with--gguf-dirif needed, thenserve/server.pyon that run config. It never downloads model files, never generates keys, and letsSTRATA_ALLOWED_HOSTSstand in for a key on a non-loopback bind.strata launchstays the default for people who want the appliance.STRATA_ALLOWED_HOSTS(or an explicit opt-out such as--insecure-no-key), aNO_DOWNLOAD=1that turns a missing file into a hard error, and a way to turn off the status loop.Smallest steps or command that reproduce it
-v /path/to/IQ2_XS:/data/models/IQ2_XS -e FAMILY=qwen -e MODEL=IQ2_XS. No download happens.main(0.2.x) and start it with the same mounts and env.Workaround in use: override the entrypoint, run
/opt/strata/terminal/setup.pyin Control mode with--gguf-dir, then startserve/server.pydirectly. This depends on internal paths that may move again in the next release.Reproduction status
Reproduced locally: the re-download, and the server's own refusal of a keyless non-loopback bind (item 1). The launcher's key rule (item 1) and the status loop (item 3): unconfirmed static analysis.
Strata version
9ae93f7(0.2.x, built frommain; 0.1.45 worked)Graphics card, memory and system
irrelevant
Model, size and settings
irrelevant
Logs
irrelevant
@github-actions[bot] commented on GitHub (Oct 20, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 20, 2026):
Thanks, this follows the format now.
@mamama1 commented on GitHub (Oct 20, 2026):
yeah. like, don't be like windows. give us a "pro" mode. i have my models, i don't want an api key on my lan. simple as that. PLEASE! thank you.
until then, I'll hand build locally and/or override.
@jintakhan commented on GitHub (Oct 23, 2026):
I am trying to move from a v0.1.45 build to the latest one and I just can't. I have a hand-tuned config json that works perfectly in the old version. The new one tries to generate a config that is broken and the model fails to load. If I bind mount my config file, Strata overwrites it and runs its own config anyway.
I fail to see any merit whatsoever in forcing users to reformat their perfectly fine config files into an inline format crammed into a single STRATA_SET environment variable so that the program can regenerate it on every boot. Why do this? It makes no sense.
@jintakhan commented on GitHub (Oct 24, 2026):
The workaround I've found that sticks:
/data/state/strata/launch/docker.jsonin the prebuilt image as a templatedocker.json, add your old flags and configs/data/state/strata/launch/)strata serve --profile foobar.json@nullata commented on GitHub (Oct 24, 2026):
Follow-up from the issue author: this is how I work around it in
llamaMan, which I maintain, in case it
helps anyone else hitting the same thing. It's engine code now rather than a
one-off entrypoint override (
core/engines/strata.py).sh -cscript instead of the image's: it runssetup.py --setup --yes --no-startin Control mode, then execsserve/server.pywithSTRATA_NO_ACQUIRE=1, under Docker's init. Nostrata launch, no presets, no access modes, no generated key, no statusloop; liveness is our
/healthpoller. On an image with no/opt/strata/terminalthe same script execs that image's owndocker-entrypoint.sh, so 0.1.x and 0.2.x both work. These are stillupstream internals with no supported contract, which is what this issue is
about.
settings baked into
strata-<tag>.jsonare fingerprinted against what lastcame up healthy, and
REINSTALL=1goes out only when they differ;layer_splitand the watchdog are applied at every start.binds loopback, a small in-container TCP relay carries
0.0.0.0:8080to it,and
STRATA_ALLOWED_HOSTSstill does the Host/Origin check. Auth is decidedone layer up, identically for both engines.
and point
GGUF_DIRat them so setup reuses them. That's opt-in; the defaultis still Strata downloading, and the MTP layer and the pack are always
prepared inside the container. There is no hard fail when the shard set is
incomplete, which is the
NO_DOWNLOAD=1gap in this issue.Strata commit (
docs/en/STRATA.md) and the container spec is asserted by unittests, so an upstream path move is a caught regression on our side.
What would let us delete code is item 1 of your list. A server-only mode, with
NO_DOWNLOAD=1as a hard error and a keyless non-loopback bind gated bySTRATA_ALLOWED_HOSTS, would remove both the download guard-rail and the relay.@Niko1221 commented on GitHub (Oct 27, 2026):
Thank you for the detailed report. The silent re-download is fixed in 0.2.7: it now fails loudly instead of fetching the files again. Running the engine without the wrapper is a larger design, we keep this issue open for it.
Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7
@jintakhan commented on GitHub (Oct 27, 2026):
Sorry so are we keeping this issue open or not?
@nullata commented on GitHub (Oct 27, 2026):
🤷
@nullata commented on GitHub (Oct 28, 2026):
Confirmed fixed in 0.2.7 —
legacy_models_guardstops the silent re-download, and the auto-generated key with--show-key/API_KEY_FILEcovers the key half. No further action, thanks.