Issues / #1244

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

closed · @ampersandru · 3 comentários · No GitHub

Setup & installNVIDIA / CUDAModels & quantsSecurity

Descrição

## 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?

No site

Links install, modelos, releases.