Issues / #1952

#1952 [Feature Request] Support IDLE_UNLOAD_S environment variable in Docker

open · @bsvdoom · 0 comments · View on GitHub

Setup & install

Description

Strata already supports automatic model unloading after a period of inactivity through the idle_unload_s configuration option.

However, the Docker setup currently requires manually editing the generated model configuration file under /data/config/strata-<model>.json to enable this feature.

This setting can be lost when REINSTALL=1 regenerates the configuration. It would be much more convenient to configure idle unloading directly through Docker environment variables, especially for users running Strata alongside other GPU workloads or local model servers.

Proposed solution

Please add support for an IDLE_UNLOAD_S environment variable in the Docker entrypoint.

For example, in .env or compose.yml:

IDLE_UNLOAD_S=120

This would automatically unload the model after 120 seconds without requests and allow it to load again when a new request arrives.

Expected behavior
IDLE_UNLOAD_S configures the existing idle_unload_s functionality.
The setting is applied when the container starts, including when an existing model configuration is reused.
The value survives configuration regeneration and REINSTALL=1 without requiring manual JSON edits.
When the variable is unset, Strata retains its current default behavior.
The Docker documentation lists the new environment variable and explains how to configure it.
Use case

I run Strata in Docker on a machine that also runs other local LLMs and GPU-intensive applications. I want the Strata container and API to remain available while the model releases VRAM automatically when idle.

Currently, this requires manually editing the generated JSON configuration. Exposing the existing option through an environment variable would make the Docker setup easier to maintain and automate.

Thanks for Strata and for considering this improvement!

Related on strata.com

Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.