[GH-ISSUE #1244] Docker v0.1.40: persisted /data/config edits ignored on restart; stale /opt/strata config used (worked in v0.1.39) #512

Closed
opened 2026-11-04 01:43:39 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @ampersandru on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1244

Problem

After upgrading from v0.1.39 to v0.1.40, edits to the generated config in the persistent /data/config directory were ignored on container restart. Strata continued using a different copy under /opt/strata. I did not encounter this behavior on v0.1.39; I have not bisected the change.

Environment

  • Unraid, deployed through Portainer
  • Locally built Strata Docker image, tagged strata:latest, upgraded for v0.1.40
  • IQ3_S, context 262144, K8V4, GPU vision
  • Intel i5-14600K, 80 GiB DDR4
  • RTX 3090 24 GB + RTX 5060 Ti 16 GB, GPUS=all, LAYER_SPLIT=auto
  • REINSTALL=0
  • Directory bind mount: /mnt/user/AI/Strata/docker:/data

Reproduction / evidence

  1. Set up IQ3_S in the container.
  2. Edit /data/config/strata-iq3_s.json through the host-mounted directory, adding the adjacent args entries "--kv-resident", "32768".
  3. Restart the existing container with REINSTALL=0.
  4. Startup settings still omit --kv-resident and memory usage remains unchanged.

Checks on the affected container:

docker inspect strata-official --format '{{range .Config.Env}}{{println .}}{{end}}' | grep '^REINSTALL='
REINSTALL=0

grep -n -A 1 -- '--kv-resident' /mnt/user/AI/Strata/docker/config/strata-iq3_s.json
26:  "--kv-resident",
27-  "32768",

docker exec strata-official grep -n -A 1 -- '--kv-resident' /opt/strata/strata-iq3_s.json
(no output)

docker inspect strata-official --format '{{range .Mounts}}{{println .Source "->" .Destination}}{{end}}'
/mnt/user/AI/Strata/docker -> /data

Expected

With REINSTALL=0, restarting should use edits to the persisted model config rather than a stale container-local copy.

Possible cause

The entrypoint creates a symlink to the persisted config only if /opt/strata/strata-$tag.json does not already exist. A regular config file left by setup can therefore prevent the persisted config from being selected. This is a hypothesis based on the script and the two differing files above.

Working workaround

I retained the /data directory mount and REINSTALL=0, and added this Compose entrypoint override to reconnect the persisted config on every start:

entrypoint:
  - /bin/sh
  - -c
  - |
    test -s /data/config/strata-iq3_s.json || {
      echo "Missing or empty /data/config/strata-iq3_s.json"
      exit 1
    }
    rm -f /opt/strata/strata-iq3_s.json
    exec /opt/strata/docker-entrypoint.sh

After recreating the container with that override, startup correctly reported:

--max-context 262144 --kv k8v4 --kv-resident 32768 --vision --vram-reserve-mib 700
--remote-expert-opt --pool-workers 9
ready: ... context 262144 tokens, images on, API key required

A direct single-file bind mount onto /opt/strata/strata-iq3_s.json was also tried as a workaround, but it failed because setup.start() saves using write_config()/os.replace():

OSError: [Errno 16] Device or resource busy:
'/opt/strata/strata-iq3_s.json.tmp' -> '/opt/strata/strata-iq3_s.json'

That file mount has been removed. The directory-mount plus entrypoint override above starts successfully. Could the Docker config lifecycle be adjusted so the persistent config is consistently authoritative, including restarts of the container that originally performed setup?

Originally created by @ampersandru on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1244 ## Problem After upgrading from v0.1.39 to v0.1.40, edits to the generated config in the persistent /data/config directory were ignored on container restart. Strata continued using a different copy under /opt/strata. I did not encounter this behavior on v0.1.39; I have not bisected the change. ## Environment - Unraid, deployed through Portainer - Locally built Strata Docker image, tagged strata:latest, upgraded for v0.1.40 - IQ3_S, context 262144, K8V4, GPU vision - Intel i5-14600K, 80 GiB DDR4 - RTX 3090 24 GB + RTX 5060 Ti 16 GB, GPUS=all, LAYER_SPLIT=auto - REINSTALL=0 - Directory bind mount: /mnt/user/AI/Strata/docker:/data ## Reproduction / evidence 1. Set up IQ3_S in the container. 2. Edit /data/config/strata-iq3_s.json through the host-mounted directory, adding the adjacent args entries "--kv-resident", "32768". 3. Restart the existing container with REINSTALL=0. 4. Startup settings still omit --kv-resident and memory usage remains unchanged. Checks on the affected container: ~~~text docker inspect strata-official --format '{{range .Config.Env}}{{println .}}{{end}}' | grep '^REINSTALL=' REINSTALL=0 grep -n -A 1 -- '--kv-resident' /mnt/user/AI/Strata/docker/config/strata-iq3_s.json 26: "--kv-resident", 27- "32768", docker exec strata-official grep -n -A 1 -- '--kv-resident' /opt/strata/strata-iq3_s.json (no output) docker inspect strata-official --format '{{range .Mounts}}{{println .Source "->" .Destination}}{{end}}' /mnt/user/AI/Strata/docker -> /data ~~~ ## Expected With REINSTALL=0, restarting should use edits to the persisted model config rather than a stale container-local copy. ## Possible cause The entrypoint creates a symlink to the persisted config only if /opt/strata/strata-$tag.json does not already exist. A regular config file left by setup can therefore prevent the persisted config from being selected. This is a hypothesis based on the script and the two differing files above. ## Working workaround I retained the /data directory mount and REINSTALL=0, and added this Compose entrypoint override to reconnect the persisted config on every start: ~~~yaml entrypoint: - /bin/sh - -c - | test -s /data/config/strata-iq3_s.json || { echo "Missing or empty /data/config/strata-iq3_s.json" exit 1 } rm -f /opt/strata/strata-iq3_s.json exec /opt/strata/docker-entrypoint.sh ~~~ After recreating the container with that override, startup correctly reported: ~~~text --max-context 262144 --kv k8v4 --kv-resident 32768 --vision --vram-reserve-mib 700 --remote-expert-opt --pool-workers 9 ready: ... context 262144 tokens, images on, API key required ~~~ A direct single-file bind mount onto /opt/strata/strata-iq3_s.json was also tried as a workaround, but it failed because setup.start() saves using write_config()/os.replace(): ~~~text OSError: [Errno 16] Device or resource busy: '/opt/strata/strata-iq3_s.json.tmp' -> '/opt/strata/strata-iq3_s.json' ~~~ That file mount has been removed. The directory-mount plus entrypoint override above starts successfully. Could the Docker config lifecycle be adjusted so the persistent config is consistently authoritative, including restarts of the container that originally performed setup?
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

Fixed in 0.1.40.2: with REINSTALL=0 the entrypoint now replaces a regular config file left in /opt/strata by a link to the one on the /data volume, so edits to /data/config/*.json are used on the next restart. Your override can go.

<!-- gh-comment-id:6038098800 --> @Niko1221 commented on GitHub (Oct 7, 2026): Fixed in 0.1.40.2: with REINSTALL=0 the entrypoint now replaces a regular config file left in /opt/strata by a link to the one on the /data volume, so edits to /data/config/*.json are used on the next restart. Your override can go.
Author
Owner

@blange48 commented on GitHub (Oct 7, 2026):

Heads-up for k8s / docker users who pick a config by linking it: since 0.1.40.2, docker-entrypoint.sh always runs ln -sfn "$STRATA_DATA/config/strata-$tag.json" /opt/strata/strata-$tag.json. That replaces a link the container command made before exec ./docker-entrypoint.sh.

We ran several configs from one volume this way (ln -sf /data/config/strata-iq3_s.1x4-batch9.json /opt/strata/strata-iq3_s.json in the pod's command: --batch 8 --batch-groups 4, an explicit --layer-split, tool_call_recovery). On 0.1.40.2 the server quietly started the plain setup config instead: no --batch, the automatic split, and nothing in the log said so. On 4× RTX 5080 that looked like a big regression: 8 clients 138 instead of 390 tok/s total, and a 45K prompt in 24 s instead of 11 s.

The workaround is easy once you know it: name the config through MODEL, since tag is just its lowercase. MODEL=IQ3_S.1X4-BATCH9 makes the entrypoint link /data/config/strata-iq3_s.1x4-batch9.json, and that works fine. Two small suggestions:

  • a line in docs (DOCKER or the 0.1.40.2 notes) that MODEL selects /data/config/strata-<model>.json, so it's the way to keep several configs on one volume;
  • an explicit CONFIG=/data/config/xxx.json env var (or keeping an existing link that already points into $STRATA_DATA/config/) would make the intent clearer than overloading MODEL.
<!-- gh-comment-id:6041423963 --> @blange48 commented on GitHub (Oct 7, 2026): Heads-up for k8s / docker users who pick a config by linking it: since 0.1.40.2, `docker-entrypoint.sh` always runs `ln -sfn "$STRATA_DATA/config/strata-$tag.json" /opt/strata/strata-$tag.json`. That replaces a link the container command made before `exec ./docker-entrypoint.sh`. We ran several configs from one volume this way (`ln -sf /data/config/strata-iq3_s.1x4-batch9.json /opt/strata/strata-iq3_s.json` in the pod's command: `--batch 8 --batch-groups 4`, an explicit `--layer-split`, `tool_call_recovery`). On 0.1.40.2 the server quietly started the plain setup config instead: no `--batch`, the automatic split, and nothing in the log said so. On 4× RTX 5080 that looked like a big regression: 8 clients 138 instead of 390 tok/s total, and a 45K prompt in 24 s instead of 11 s. The workaround is easy once you know it: name the config through `MODEL`, since `tag` is just its lowercase. `MODEL=IQ3_S.1X4-BATCH9` makes the entrypoint link `/data/config/strata-iq3_s.1x4-batch9.json`, and that works fine. Two small suggestions: - a line in docs (DOCKER or the 0.1.40.2 notes) that `MODEL` selects `/data/config/strata-<model>.json`, so it's the way to keep several configs on one volume; - an explicit `CONFIG=/data/config/xxx.json` env var (or keeping an existing link that already points into `$STRATA_DATA/config/`) would make the intent clearer than overloading `MODEL`.
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

Thanks for the detailed follow-up, and for finding the MODEL workaround. You were right: 0.1.40.2 replaced a link your pod command had made. Fixed in 0.1.40.3: an existing /opt/strata/strata-.json link that points into /data/config/ is now kept, an explicit CONFIG=/path/to/config.json env var wins when set, and the entrypoint always prints one line naming the config file the server starts with. The #1244 case (REINSTALL=0 replacing a regular file left by an image) still works. The Docker docs now say that MODEL selects /data/config/strata-.json and that CONFIG overrides it. Until 0.1.40.3 is out, MODEL=IQ3_S.1X4-BATCH9 is the way to go.

<!-- gh-comment-id:6043795852 --> @Niko1221 commented on GitHub (Oct 7, 2026): Thanks for the detailed follow-up, and for finding the MODEL workaround. You were right: 0.1.40.2 replaced a link your pod command had made. Fixed in 0.1.40.3: an existing /opt/strata/strata-<model>.json link that points into /data/config/ is now kept, an explicit CONFIG=/path/to/config.json env var wins when set, and the entrypoint always prints one line naming the config file the server starts with. The #1244 case (REINSTALL=0 replacing a regular file left by an image) still works. The Docker docs now say that MODEL selects /data/config/strata-<model>.json and that CONFIG overrides it. Until 0.1.40.3 is out, MODEL=IQ3_S.1X4-BATCH9 is the way to go.
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#512
No description provided.