Files
infrastructure/llm-server/llm/ansible/roles/inference_engine/README.md
T
spektr 060901d104 LLM-Server: Container-Protokollierung geklärt und in GNAI-010 dokumentiert (v0.7)
conmon schreibt mit dem Journald-Treiber ins System-Journal (Syslog-Identifier
= Container-Name, _COMM=conmon); lesbar als root, podman logs bleibt für das
Workload-Konto leer (Journal-Dateirechte, bewusst keine systemd-journal-
Gruppe). Lesewege in GNAI-010 Abschnitt 8.1; 64k-Bring-up-Startlogs sind
protokollfähig (n_slots=1, n_ctx_slot=65536, Listening, MTP-Tensoren nicht
geladen). Zusätzlich dokumentiert: LLAMA_ARG_HOST-Default des Images und die
bewusst akzeptierte API-Key-Lücke des internen Testing-Netzes.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-01 17:32:17 +01:00

68 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# inference_engine
Deploys the inference engine for one KI environment as rootless Podman
Quadlets (GNAI-010 sections 5 and 6; first profile: llama.cpp). Runs after
`model_store` in the same play and reuses `model_store_root`.
## Variables
- `inference_engine_image_ref` – immutable image digest (`ghcr.io/...@sha256:...`).
- `inference_engine_user` / `inference_engine_uid` / `inference_engine_user_home`
– workload account created by the host `workload_accounts` role.
- `inference_engine_unit_prefix` – unit and container prefix of the
environment (Testing: `gnai-testing-llama`).
- `inference_engine_network_name` / `inference_engine_network_alias` –
internal-only Quadlet network (`Internal=true`), alias `llama-cpp` for the
later API policy layer.
- `inference_engine_profiles` – map of model profiles; each needs `unit_suffix`,
`model_directory`, `model_file`, `alias`, `ctx_size`, `n_predict`,
`reasoning_effort`, sampling values and an `mtp` block.
- `inference_engine_active_profile` – the single profile to start.
- `inference_engine_ctx_size_override` – when not `null`, replaces every
profile's `ctx_size` (Testing bring-up: 65536; set to `null` after the 128k
acceptance, GNAI-008 section 7.5).
## Behaviour
- Validates declarations, requires `/dev/kfd` plus exactly two render nodes,
and requires every profile's model artifact (run `--tags models` first).
- Pulls the pinned image by digest into the environment's rootless store
only when missing.
- Renders `<network>.network` and one `.container` per profile into
`/etc/containers/systemd/users/<uid>/`; units are never enabled for
`default.target`.
- Units mutually exclude each other via `Conflicts=`/`Before=`
(GNAI-010 section 5.3).
- Exercises the Quadlet generator with `--dryrun` before any reload; quadlet
changes notify a `daemon-reload` of the workload user manager. Services
are never restarted automatically.
- Switch/start (only with the `service` tag, never in check mode): stop any
other active engine unit, start the selected unit, wait for `/health`, and
verify the served alias via `/v1/models`. The HTTP check uses whichever of
`curl`/`wget` exists in the pinned image (GNAI-010 section 8).
## Tags
- `service` – everything in this role. Model provisioning belongs to the
`models` tag of the `model_store` role.
## Logs
conmon writes the container output to the system journal (journald driver)
with the syslog identifier set to the container name. Read as root:
```bash
journalctl _COMM=conmon -t gnai-testing-llama-swift --no-pager
```
`podman logs` returns empty for the workload account (journal file
permissions); acceptance protocols are collected as root (GNAI-010 section
8.1).
## Notes
- There is no `PublishPort=`; the engine is reachable only inside the
environment network.
- The role does not start the engine in check mode and never downloads
models.