Skip to content

fix(docker): skip the ONNX download for non-onnx backends and fail clearly on unwritable /data (#1398) - #1400

Merged
ajianaz merged 1 commit into
developfrom
fix/docker-entrypoint-embedding-backend-1398
Oct 9, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/docker-entrypoint-embedding-backend-1398

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

What

docker-entrypoint.sh now resolves the embedding backend before deciding to download the model: UTEKE_EMBEDDING_BACKEND, then [embedding] backend in $UTEKE_HOME/uteke.toml, then onnx. Only onnx downloads the local model. When a download is needed but the data dir is not writable, it exits with a message that names the three fixes (chown the volume, pre-populate the model, use an external embedder) instead of dying on a bare mkdir error. The data dir follows UTEKE_HOME (image default stays /data).

Why

Closes #1398. A labs instance configured with UTEKE_EMBEDDING_BACKEND=openai looped on "Model not found, downloading..." and mkdir: cannot create directory '/data/models': Permission denied, so uteke-serve never started. Note: this fixes the container start; making the server actually USE the external embedder is #1399 (separate PR).

Testing

  • fmt, clippy -D warnings green; 7 new integration tests (crates/uteke-server/tests/docker_entrypoint.rs) run the real script with a fake curl and a fake uteke-serve: external backend from env or toml skips the download and reaches exec; env beats toml; only the [embedding] section counts; onnx with the model present does not download; an unwritable data dir gives the clear error for onnx but is fine for an external backend
  • The same 7 tests fail against the old script
  • Not tested: a real docker build / docker run (no Docker run in this session), and the unwritable-dir test is skipped when the tests run as root

🤖 Generated with Claude Code

…early on unwritable /data (#1398)

The entrypoint now resolves the embedding backend (UTEKE_EMBEDDING_BACKEND,
then [embedding] backend in $UTEKE_HOME/uteke.toml, then onnx) and only
downloads the local model for onnx. If a download is needed but the data dir
is not writable it exits with an actionable message. Data dir follows
UTEKE_HOME (default /data). Covered by integration tests that run the script
with a fake curl and a fake uteke-serve.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 20f4f6c into develop Oct 9, 2026
15 of 16 checks passed
@ajianaz
ajianaz deleted the fix/docker-entrypoint-embedding-backend-1398 branch October 9, 2026 04:36
ajianaz added a commit that referenced this pull request Oct 9, 2026
* fix(docker): skip the ONNX download for non-onnx backends and fail clearly on unwritable /data (#1398) (#1400)

The entrypoint now resolves the embedding backend (UTEKE_EMBEDDING_BACKEND,
then [embedding] backend in $UTEKE_HOME/uteke.toml, then onnx) and only
downloads the local model for onnx. If a download is needed but the data dir
is not writable it exits with an actionable message. Data dir follows
UTEKE_HOME (default /data). Covered by integration tests that run the script
with a fake curl and a fake uteke-serve.

Co-authored-by: ajianaz <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* fix(server): honour [embedding]/[vector] config and UTEKE_EMBEDDING_BACKEND (#1399) (#1401)

uteke-serve opened the store with Uteke::open(), which hardcodes the onnx
backend, so an external OpenAI-compatible or Ollama embedder could never be
used. The server now resolves the embedder (env backend > [embedding] backend
> onnx) and the [vector] engine and opens the store with
open_with_embedding_and_graph, as the CLI does. An unsupported backend exits
with an actionable error. The project-local file stays untrusted for
embedding.* keys via the shared layered resolver.

Co-authored-by: ajianaz <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* chore(release): v0.20.1 - version bump, changelog, docs sync

Patch release with the two embedder fixes (#1398, #1399) cherry-picked from
develop; version files, skill version lines, core-contract.json and the
CHANGELOG entry updated.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: ajianaz <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(docker): entrypoint downloads the ONNX model for non-onnx backends and loops when /data is not writable

1 participant