Files
leleka/deploy

Deployment

Linux CI builds a statically linked musl CLI/control-plane preview and publishes it as a prerelease artifact on version tags. This is not yet a complete GPU runtime: the C++/CUDA engine is not linked into that executable. The host must have a compatible NVIDIA driver already installed (CUDA 13.0 GA baseline: 580.65.06 or newer). The strata-next doctor command checks the installed version. Model weights belong on an external volume. A complete GPU deployment image has not been built yet.

For a local static CLI image smoke test, build deploy/Dockerfile.static-cli with a Linux/musl target. The final image is scratch plus the CLI binary. It is a packaging test, not the deployment image for inference.

Worker recovery

The Rust supervisor defaults to three lifetime restarts after a post-READY worker failure, with 2/4/8-second backoff. Configure engine.max_restarts or STRATA_MAX_WORKER_RESTARTS from 0 to 3; zero disables recovery. Failed and queued generations are not replayed. Readiness stays false until the new worker handshake completes. A startup failure or an exhausted budget leaves the service unhealthy for inference until an operator restarts it; /health remains available. See the API contract.

Native Linux service lifecycle

strata-next service-unit renders a systemd user unit to stdout. It does not install, start, enable or replace a service. Provision the native executable, engine, tokenizer and private JSON configuration first; all supplied paths must be absolute and exist. Systemd disallows quotes and backslashes in the executable path; the renderer rejects these with a relocation instruction. For example, on the Linux host:

umask 077
mkdir -p "$HOME/.config/systemd/user"
/absolute/path/strata-next service-unit \
  --config /absolute/path/config.json \
  --working-dir /absolute/path/engine-workdir \
  --env-file /absolute/path/runtime.env > "$HOME/strata-next.service"
systemd-analyze --user verify "$HOME/strata-next.service"
# Review the generated unit before installing. Do not overwrite a live unit.
systemctl --user link "$HOME/strata-next.service"
systemctl --user start strata-next.service
systemctl --user status strata-next.service
journalctl --user -u strata-next.service -n 100

Omit --env-file if unnecessary. The file uses systemd EnvironmentFile syntax, not shell commands; it can set LD_LIBRARY_PATH and engine tuning variables. Its path cannot contain glob characters (*, ?, [), backslashes or trailing whitespace, because systemd interprets that directive as a filename pattern. serve --config FILE selects the explicit config even if STRATA_CONFIG is also set; other documented environment overrides still apply. Keep the API bound to loopback and use SSH forwarding until native authentication exists.

Systemd process startup is not model readiness: check the configured /ready endpoint before connecting the console harness. Restart=no preserves the supervisor's finite worker restart policy. SIGTERM goes to the supervisor; remaining processes in its cgroup are killed after the 45-second stop deadline. No model or logs are copied into a release by rendering the unit. Journald retention is managed by the host; model and capture paths should remain private.

To stop and remove an explicitly installed service:

systemctl --user stop strata-next.service
systemctl --user disable strata-next.service
systemctl --user daemon-reload

The service is not enabled at login/boot by these instructions. A running user manager is required. The existing trial endpoint remains externally launched; this feature does not migrate it or add managed qwen-codex-ctl start/stop yet. Use the existing connect strata-native command once the service is ready.

Verification without GPU inference:

python3 scripts/smoke-service-unit.py /absolute/path/strata-next --lifecycle

This creates and removes an isolated CPU-only service on an unused loopback port. It checks real systemd path parsing (spaces, quotes, backslashes, $ and %), config precedence, environment loading, health, false readiness without a worker and process removal. Without --lifecycle, only unit syntax and rejected path checks run, as wired into Linux CI. Hosted CI execution remains pending.