Docker entrypoint MODEL_PATH check fails when folder has .gguf but no .strata files (circular error message)

Open Beginner friendly
#6,721 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, shell
Domain
devops

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

needs-format

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Niko1221/Strata

All issues in Niko1221/Strata

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.