Runtimes page and Docker settings
1 parent
26f3d3085a
commit
a058ac6227
3 files changed
+56
No files matched your search
+13
@@ -87,6 +87,19 @@ Notes:
|
||||
- If a download is interrupted, the `hf` CLI restarts unfinished files from the beginning (it can't
|
||||
resume partial files); finished files are kept.
|
||||
|
||||
## Runtimes (Docker)
|
||||
|
||||
Runtimes let Kaname start llama.cpp / vLLM containers (Settings → Runtimes). The worker talks to
|
||||
Docker through the `docker-proxy` service in `compose.yaml`, which only exposes the parts of the
|
||||
Docker API Kaname needs (containers, images, networks, info). Remove that service and `DOCKER_HOST`
|
||||
to run Kaname as a pure downloader. See [[Runtimes]].
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --- | --- | --- |
|
||||
| `DOCKER_HOST` | set in `compose.yaml`: `tcp://docker-proxy:2375` | Docker API the worker uses (`tcp://…` or `unix:///var/run/docker.sock`). Unset: runtimes are disabled. |
|
||||
| `KANAME_DOCKER_NETWORK` | auto-detected | Docker network the model containers join so the worker can reach them. Detected from the worker's own container; only needed if the worker doesn't run in Docker. |
|
||||
| `KANAME_MODELS_SOURCE` | auto-detected | Where the models live on the Docker host: a host path (`/mnt/nas/models`) or a volume name. Mounted read-only into model containers. Detected from the worker's `/models` mount; only needed if the worker doesn't run in Docker. |
|
||||
|
||||
## Advanced
|
||||
|
||||
You normally don't set these: the image's defaults match the paths in `compose.yaml`.
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
# Runtimes
|
||||
|
||||
A runtime is a container image that serves models. Kaname starts runtime containers itself
|
||||
(model tests and benchmarks build on this), so you can try configs for llama.cpp, vLLM, or your own
|
||||
forks (e.g. a vLLM build patched for Intel Arc) without leaving Kaname.
|
||||
|
||||
## Setup
|
||||
|
||||
`compose.yaml` contains a `docker-proxy` service ([tecnativa/docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy))
|
||||
and sets `DOCKER_HOST=tcp://docker-proxy:2375` for the worker. The proxy holds the Docker socket and
|
||||
only lets through containers, images, networks and info requests. It isn't published on a port.
|
||||
|
||||
Settings → Runtimes shows what the worker sees: Docker version, CPU model and features (AVX2,
|
||||
AVX-512, AMX, …), memory, the network model containers join, and where the models come from on the
|
||||
Docker host (both detected from the worker's own container).
|
||||
|
||||
## Runtimes
|
||||
|
||||
Two presets are created on first start:
|
||||
|
||||
| Preset | Image | Serves |
|
||||
| --- | --- | --- |
|
||||
| llama.cpp (CPU) | `ghcr.io/ggml-org/llama.cpp:server` | GGUF models. Pin a build like `server-b11429` for reproducible tests. |
|
||||
| vLLM (CPU) | `vllm/vllm-openai-cpu:v0.31.0` | safetensors models. BF16 is recommended on AMD Zen; `VLLM_CPU_KVCACHE_SPACE` is the KV cache size in GiB. AVX-512 recommended, AVX2 minimum. |
|
||||
|
||||
Add your own with **Add runtime → Custom image**: any image from any registry (including your own
|
||||
Gitea registry). Fields:
|
||||
|
||||
- **Engine type**: *llama.cpp-compatible* or *vLLM-compatible*. Decides how Kaname builds the command
|
||||
line and talks to the server; forks with the same CLI use the same type.
|
||||
- **Environment**, **Extra arguments** (appended to the generated command), **Shared memory**.
|
||||
- **Devices**: GPU device nodes to pass through, limited to `/dev/dri…` and `/dev/kfd`.
|
||||
- **NUMA tuning**: adds `CAP_SYS_NICE` and `seccomp=unconfined`, as vLLM recommends for its CPU
|
||||
build. Off by default because it relaxes the container's isolation.
|
||||
|
||||
**Pull** downloads the image (with progress); **Update** pulls a moving tag like `:server` again.
|
||||
|
||||
## Limits
|
||||
|
||||
Kaname only starts images registered as runtimes, never in privileged mode or with the host network,
|
||||
and always mounts the models read-only. Kaname uses prebuilt images; build forks elsewhere (e.g. a
|
||||
CI pipeline) and push them to a registry.
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
- [[Home]]
|
||||
- [[Configuration]]
|
||||
- [[Importing existing models]]
|
||||
- [[Runtimes]]
|
||||
- [[Storing models on a NAS]]
|
||||
- [README / Install](https://git.linxweiler.xyz/pascallinxweiler/Kaname)
|
||||
Reference in new issue
Block a user