mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2598
Author: @qiuzan2001
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:chief-serve/docker-idle-unload📝 Commits (1)
31e7e44Docker: IDLE_UNLOAD_S unloads the model after that many idle seconds, for a config setup rewrites too (#1952)📊 Changes
7 files changed (+54 additions, -4 deletions)
View changed files
📝
Dockerfile(+2 -1)📝
docker-entrypoint.sh(+3 -0)📝
docs/DETAILS.md(+1 -1)📝
docs/INSTALL.md(+3 -0)📝
serve/server.py(+17 -1)📝
serve/test_lifecycle.py(+20 -0)📝
tools/test_docker_entrypoint.py(+8 -1)📄 Description
Fixes #1952 (opt-in: nothing changes unless the variable is set).
What it changes. The server's idle unload (
"idle_unload_s"in the run config,--idle-unload) was reachablein the container only by editing the generated config on the volume, and
REINSTALL=1rewrote that config withoutit.
docker-entrypoint.shreadsIDLE_UNLOAD_Sand exports it asSTRATA_IDLE_UNLOAD_Sbefore it starts setup.setup starts the server with the inherited environment.
serve/server.py: a newidle_unload_seconds(arg, cfg, env)takes--idle-unload, else the config's"idle_unload_s", elseSTRATA_IDLE_UNLOAD_S. A value that is not a number is said once, and the model staysloaded.
What it leaves alone. Without the variable, every config gives the same value as before: a missing key,
nulland
""give 0;0, a number and a numeric string are read as before. A config's own"idle_unload_s"(a0included) still wins over the variable, and
--idle-unloadwins over both. The idle unload itself is unchanged.How it was checked.
tools/test_docker_entrypoint.pytest_idle_unload_s_reaches_the_server_1952: the server's environment getsSTRATA_IDLE_UNLOAD_S=120on a plain start and withREINSTALL=1, and nothing when the variable is empty. (Thestub server prints the variable.)
serve/test_lifecycle.pyIdleUnloadSetting: the order of the three sources, a config's0, no variable, avariable that is not a number, and a negative one.
main.python3 tools/test_docker_entrypoint.py: 10 OK. With the venv's Python,serve.test_lifecycle,serve.test_runconfigandserve.test_server: OK.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.