docker: model files left in the older /data/models stop the start instead of being downloaded again (#3421)
A volume or bind mount from the 0.1.x image keeps its models in /data/models. The entry point moves a folder that is part of the volume, but a folder the person mounted there is left alone, and a failed move leaves the files too; with no MODEL_PATH the start then did not see them and downloaded the model again (tens of GB) without a word. Now, when .gguf files are still in /data/models and MODEL_PATH is not set, the container stops with code 2 and names the folder, says what to do (MODEL_PATH to the folder with the shards, or the files into /data/Strata-data/models) and that nothing was downloaded. ALLOW_DOWNLOAD=1 goes on anyway with the same text as a warning. docs/DOCKER.md lists the setting. The other points of the issue (the key, the removed variables, the status loop) are the owner's design questions and are not changed here. Tested by running the guard function with sh (tests/terminal/test_docker_files.py); the whole container was not run (no docker on this PC).
This commit is contained in:
1 parent
ab48216a7b
commit
10a62b8d2f
3 files changed
+75
-1
No files matched your search
+5
-1
@@ -115,6 +115,7 @@ screens; leave out what you do not care about.
|
||||
| `MODEL` | model size: `IQ2_XS`, `IQ3_XXS`, `IQ3_S`, `Q2_0`, `UD-Q4_K_XL`, ... ([MODELS.md](MODELS.md)) | Strata picks what suits the card, and says so in the log |
|
||||
| `FAMILY` | `qwen`, `unsloth`, `gyro`, `coder`, `swift`, ...; use `qwen` for the original ISTA-DASLab packs | installer recommendation; may differ by hardware |
|
||||
| `MODEL_PATH` | GGUF files you already have: a folder or one `.gguf`, **inside the container** (mount it with `-v`, `:ro` is fine) | download |
|
||||
| `ALLOW_DOWNLOAD` | `1`: go on and download the model although model files of the older layout were left unread in `/data/models` (see [From the older image](#from-the-older-image)) | stop |
|
||||
| `CONTEXT` | how much text it remembers at once: `32k`, `64k`, `128k`, `256k` or a number | the largest that fits |
|
||||
| `PARALLEL` | requests answered at the same time, 1 to 8 | fitted to the card |
|
||||
| `VISION` | `off`, `on` (the model reads pictures), `gpu`, `cpu`; the picture-reader file (about 0.9 GB) is downloaded with the model | `off` |
|
||||
@@ -276,7 +277,10 @@ package and start through `strata launch`. Mapping:
|
||||
A volume from the older image is picked up: the first start moves `/data/models`, `/data/packs` and `/data/mtp` into
|
||||
`/data/Strata-data` (a rename inside the volume: nothing is copied or downloaded again, and the prepared pack is kept). The old
|
||||
`/data/config` is not read; the run settings are made again from the files. A folder you mounted yourself at one of those places
|
||||
is left alone: point `MODEL_PATH` at it. The container name, the volume and the port can stay as they were.
|
||||
is left alone: point `MODEL_PATH` at it. If model files are still in `/data/models` when the container starts (a folder you mounted there, or
|
||||
a move that failed) and `MODEL_PATH` is not set, the start **stops at once and says where the files are**: it would otherwise download the model
|
||||
again, tens of GB, because this image does not read that place. Name the folder in `MODEL_PATH`, or set `ALLOW_DOWNLOAD=1` to download anyway.
|
||||
The container name, the volume and the port can stay as they were.
|
||||
|
||||
## Build it yourself
|
||||
|
||||
|
||||
Reference in new issue
Block a user