[PR #491] [CLOSED] docker: GGUF_DIR, RESIDENT_BUDGET_GIB and KV_STREAMING env vars; document the stop timeout #2664

Closed
opened 2026-11-04 02:02:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/491
Author: @mad9home
Created: 10/2/2026
Status: ❌ Closed

Base: main ← Head: docker/gguf-dir-and-stop-timeout


📝 Commits (10+)

  • 50c7d40 Verify restored draft KV and fail incomplete state fingerprints
  • 6622371 Refresh core validation record for upstream 0.1.27
  • 2cc4e76 Report actual draft residency in snapshot verification
  • 980b354 Record linked 0.1.27 core build and host validation
  • f9d99af Record final Linux snapshot and RAM cache acceptance
  • 8d5f80b Ignore llama.cpp dependency directories and symlinks
  • 6bf9c68 Remove planning documents from the core PR
  • d9a02e6 Compare cache-disabled engines against untouched upstream
  • cecf697 Retain unchanged KV storage across repeated conversation parking
  • 8dddc9e Bound incremental snapshot fragmentation and preserve cache admission

📊 Changes

3 files changed (+22 additions, -2 deletions)

View changed files

📝 Dockerfile (+2 -1)
📝 docker-entrypoint.sh (+11 -1)
📝 docs/INSTALL.md (+9 -0)

📄 Description

What

  • GGUF_DIR passes setup's --gguf-dir, so a container can use model files the host already has. #252 and #444 answer this for the native setup; the entrypoint had no way to pass it, so FAMILY=unsloth downloaded 111 GB again.
  • RESIDENT_BUDGET_GIB and KV_STREAMING pass --resident-budget-gib and --kv-streaming. Unset keeps setup's own defaults, so nothing changes for existing users.
  • docs/INSTALL.md: the mounted GGUF folder has to be writable on the first start (the Unsloth SHA-256 result is kept as <shard>.done next to each shard; :ro works afterwards), and a note on the stop timeout.

Why the stop timeout: releasing ~56 GiB of page-locked RAM after SIGTERM takes ~20 s here, longer than Docker's 10 s default, so docker stop kills the server (exit 137). With --stop-timeout 60 it exits cleanly (exit 0).

Tested on v0.1.35, RTX 3090, Linux, image built from this branch (CUDA_ARCHITECTURES=86, BUILD_VISION=0):

Case Result
First start, GGUF_DIR=/gguf (writable), FAMILY=unsloth MODEL=UD-Q4_K_XL no download, config --native /gguf/…, healthy, answers
RESIDENT_BUDGET_GIB=60 KV_STREAMING=on CONTEXT=65536 --resident-budget-gib 60, --kv-resident 32768 in the config
Second start, GGUF folder mounted :ro setup skipped, healthy
docker stop -t 10 / --stop-timeout 60 exit 137 after 21 s / exit 0 after 21 s

No engine or setup.py change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/491 **Author:** [@mad9home](https://github.com/mad9home) **Created:** 10/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `docker/gguf-dir-and-stop-timeout` --- ### 📝 Commits (10+) - [`50c7d40`](https://github.com/Niko1221/Strata/commit/50c7d40c1dc15e0518ce2b66587ec8e4950233a5) Verify restored draft KV and fail incomplete state fingerprints - [`6622371`](https://github.com/Niko1221/Strata/commit/6622371f6b0ef248d94e35eef2343f0d0234a539) Refresh core validation record for upstream 0.1.27 - [`2cc4e76`](https://github.com/Niko1221/Strata/commit/2cc4e763320b8f7e5da799500ba3a61cdf2889a5) Report actual draft residency in snapshot verification - [`980b354`](https://github.com/Niko1221/Strata/commit/980b354f45dafdf6d5d3faf2d0d2d39393ce8918) Record linked 0.1.27 core build and host validation - [`f9d99af`](https://github.com/Niko1221/Strata/commit/f9d99afc364c074e9d066d00f65f673efcaa42ec) Record final Linux snapshot and RAM cache acceptance - [`8d5f80b`](https://github.com/Niko1221/Strata/commit/8d5f80b4545c0d1744d2dacc3cfa7dc689e22663) Ignore llama.cpp dependency directories and symlinks - [`6bf9c68`](https://github.com/Niko1221/Strata/commit/6bf9c687e6b20d448711d037a261153c5f550c9e) Remove planning documents from the core PR - [`d9a02e6`](https://github.com/Niko1221/Strata/commit/d9a02e60e4de3a2207de4a58319313a0ee1bf1b2) Compare cache-disabled engines against untouched upstream - [`cecf697`](https://github.com/Niko1221/Strata/commit/cecf697436592ebe76dfea7e3e9d32456cd75ef6) Retain unchanged KV storage across repeated conversation parking - [`8dddc9e`](https://github.com/Niko1221/Strata/commit/8dddc9e8a29c53b494e8419401f5474fceca80a8) Bound incremental snapshot fragmentation and preserve cache admission ### 📊 Changes **3 files changed** (+22 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+2 -1) 📝 `docker-entrypoint.sh` (+11 -1) 📝 `docs/INSTALL.md` (+9 -0) </details> ### 📄 Description **What** - `GGUF_DIR` passes setup's `--gguf-dir`, so a container can use model files the host already has. #252 and #444 answer this for the native setup; the entrypoint had no way to pass it, so `FAMILY=unsloth` downloaded 111 GB again. - `RESIDENT_BUDGET_GIB` and `KV_STREAMING` pass `--resident-budget-gib` and `--kv-streaming`. Unset keeps setup's own defaults, so nothing changes for existing users. - `docs/INSTALL.md`: the mounted GGUF folder has to be writable on the first start (the Unsloth SHA-256 result is kept as `<shard>.done` next to each shard; `:ro` works afterwards), and a note on the stop timeout. **Why the stop timeout:** releasing ~56 GiB of page-locked RAM after SIGTERM takes ~20 s here, longer than Docker's 10 s default, so `docker stop` kills the server (exit 137). With `--stop-timeout 60` it exits cleanly (exit 0). **Tested** on v0.1.35, RTX 3090, Linux, image built from this branch (`CUDA_ARCHITECTURES=86`, `BUILD_VISION=0`): | Case | Result | |---|---| | First start, `GGUF_DIR=/gguf` (writable), `FAMILY=unsloth MODEL=UD-Q4_K_XL` | no download, config `--native /gguf/…`, healthy, answers | | `RESIDENT_BUDGET_GIB=60 KV_STREAMING=on CONTEXT=65536` | `--resident-budget-gib 60`, `--kv-resident 32768` in the config | | Second start, GGUF folder mounted `:ro` | setup skipped, healthy | | `docker stop -t 10` / `--stop-timeout 60` | exit 137 after 21 s / exit 0 after 21 s | No engine or setup.py change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:02:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2664
No description provided.