Skip to content

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

Closed

Description

@ampersandru

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?

Activity

  1. Niko1221 commented on Oct 7, 2026

    @Niko1221
    Owner

    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.

  2. blange48 commented on Oct 7, 2026

    @blange48
    Contributor

    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.
  3. Niko1221 commented on Oct 7, 2026

    @Niko1221
    Owner

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions