Docker entrypoint MODEL_PATH check fails when folder has .gguf but no .strata files (circular error message)
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
Research direction
The bug is in the MODEL_PATH validation around line 196 of tools/docker/entrypoint.sh, where the ls glob check fails when no .strata files exist. Read that condition, then reproduce with the snippet in the issue using a folder containing only a .gguf file. Done when the check passes for a .gguf-only folder and the error message no longer suggests the same MODEL_PATH value.
Written by the indexing model from the issue text.
Description
Bug
Version: v0.2.20 (image built with tools/docker/build.sh, engine 0.1.66 cuda13)
In tools/docker/entrypoint.sh (line ~196), the MODEL_PATH validation uses:
elif [ -d "$model_path" ] && ! ls "$model_path"/*.gguf "$model_path"/*.strata >/dev/null 2>&1; then
When the folder contains .gguf files but no .strata files, the unexpanded literal "$model_path"/*.strata is passed to ls, which fails — and since ls only succeeds when all arguments succeed, the whole command returns non-zero even though the .gguf glob matched. The container then dies with:
[X] MODEL_PATH=/data/Strata-data/models/IQ2_XS has no .gguf or .strata files directly in it, but there are some in /data/Strata-data/models/IQ2_XS. Set MODEL_PATH=/data/Strata-data/models/IQ2_XS (the folder that holds the shards of one model). Nothing was downloaded. 2
The message is circular: it suggests setting MODEL_PATH to exactly what it already is.
Reproduction
mkdir -p /tmp/m/myshards
touch /tmp/m/myshards/model-00001-of-00002.gguf
# inside the container (any sh):
model_path=/tmp/m/myshards
[ -d "$model_path" ] && ! ls "$model_path"/*.gguf "$model_path"/*.strata >/dev/null 2>&1 && echo 'BUG: reports empty'
# → BUG: reports empty
Happens with nullglob unset (the default), where ls receives the literal unmatched glob.
Fix
elif [ -d "$model_path" ] && ! { ls "$model_path"/*.gguf >/dev/null 2>&1 || ls "$model_path"/*.strata >/dev/null 2>&1; }; then
(or use compgen -G / find "$model_path" -maxdepth 1 -name '*.gguf' | grep -q .)
Workaround in use
Mounting a patched entrypoint over /opt/strata/entrypoint.sh:ro — with that one-line fix the same volume starts correctly and reuses the existing 68 GB of GGUF shards.
Tested on an RTX 3090 host, Docker 27.x, image strata:v0.2.20 built from tools/docker/build.sh --flavor cuda.
- Dominant language
- C++
- Stars
- 11.6k
- Forks
- 1k
- Avg merge
- 17d 21h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Niko1221/Strata
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Niko1221/Strata#6731 · 2 comments ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Niko1221/Strata#6698 · 2 comments ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Niko1221/Strata#6670 · 2 comments ·
Maintainers usually reply within 6 days
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
sav-oss-org/ptusa_main#1610 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
open-astro/AlpacaBridge#2606 · 1 comment ·
Maintainers usually reply within 1 day
-
Refactor force_torque_system integration test to use EcmScopePossibly taken @patelshivani2283-lab claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
upnp > 18 fixesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BZFlag-Dev/bzflag#407 ·