本页面为机器翻译。阅读英文原文。

Component

core/ai-model/docker-model-runner

A model served by Docker Model Runner, named by its OCI model reference (`ai/smollm2`, say), behind an OpenAI-compatible API. The same reference is served on both targets, so one Aggregate builds for Docker Compose and for Kubernetes and asks both for the same model. The reference is a deterministic pointer the runner resolves when it pulls the model; the compiler never fetches it. On Docker Compose the host's own Docker Model Runner serves it: the compose file declares the model in its top-level `models` element, and Compose pulls and configures it when the stack starts. That needs what no build can check: Docker Compose 2.38 or later, Docker Model Runner enabled on the host, and a model CLI of at least 1.0.6 for `runtime_flags` to reach the engine. On Kubernetes the Docker Model Runner server runs in-cluster, pulls the same reference into a per-replica model cache, and serves it behind a ClusterIP Service. Consumers read the endpoint, model, host, port and protocol over a `uses` edge. Each operator setting works on the target where it means something and is refused by name on the other.

来源

官方由本目录认定为官方发布者的签名身份签名。
内容摘要
sha256:5aaacb32d0317067ed01adb05a62cc0513b1a0f64ff8d769d91c431cbfe82680
发布时间
2026-11-10T10:09:13Z
签名身份
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

签名

  • 官方application/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:46e2e3962478eb2bae9e609cc44ff00d2d8b437a57513154a25a42bbc1b47a1f

此版本的引用

oci://hub.aggrega.ai/component/core/ai-model/docker-model-runner:1.0.0

开发者参数

开发者在 Aggregate 中设置的值。

扩展 BaseComponents#/schemas/BaseModelParameter

名称类型默认值必需描述
runtime_flagsarray—否Raw command-line flags passed to the inference engine when the model is started, in Compose's own `runtime_flags` sense. Each flag reaches the runner as one list item and is never read by a shell. On Docker Compose they reach the engine only where the host's model CLI is at least 1.0.6; an older one drops them without saying so.

运维规格

运维人员按环境调整的基础设施规格。

名称类型默认值必需描述
endpointstring—否Base URL of the OpenAI-compatible API of the host's Docker Model Runner, as a container on the compose network reaches it. Read by the Docker Compose realization only, which defaults it to Docker Desktop's container-facing address, http://model-runner.docker.internal/engines/v1; on Docker Engine set it to the address the host's runner answers containers at, such as http://172.17.0.1:12434/engines/v1. The build pipes the address and never resolves it. The Kubernetes realization publishes its own Service address and refuses this key.
portinteger (min 1024, max 65535)—否Port the in-cluster runner listens on and its Service accepts requests on. Read by the Kubernetes realization, which defaults it to 12434; on Docker Compose the port is the host runner's own and part of infra.endpoint, so the key is refused there.
engine_versionstring—否Docker Model Runner image tag the Kubernetes realization runs (default v1.2.8), on the server and on its model-pull step; with a GPU requested the CUDA variant of that tag is run. On Docker Compose the runner is the host's own installation, so the key is refused there.
replicasinteger (min 1)—否Number of serving replicas on Kubernetes (default 1), each with its own model cache and its own pull. On Docker Compose one host runner serves the model, so the key is refused there.
computeobject—否CPU and memory for the serving container on Kubernetes (defaults 1 and 4Gi), as requests and limits. On Docker Compose the host runner is sized by the host, so the key is refused there.
gpuobject—否Optional GPU scheduling for the serving container on Kubernetes. When count is set, the Recipe requests GPUs as the extended resource nvidia.com/gpu and runs the runner's CUDA image; a named runtime class schedules the pod under it. Omit the whole object to serve on CPU. On Docker Compose the host runner decides its own GPU use, so the key is refused there.
model_cacheobject—否Per-replica model store on Kubernetes (default size 20Gi), sized for the pulled model; each serving replica gets its own claim. On Docker Compose the host runner keeps its own store, so the key is refused there.

输出契约

此组件通过 uses 拓扑向使用方发布的值。

名称类型默认值必需描述
hoststring—是Host name the runner's API is reached at: the in-cluster Service name on Kubernetes, and the host part of the endpoint on Docker Compose. A consumer that composes its own address dials this name; one that does not reads `endpoint` instead.
portinteger—是TCP port the runner's API accepts requests on: the Service port on Kubernetes, and the port of the endpoint on Docker Compose (its scheme's default where the endpoint names none).
endpointstring—是Full base URL of the OpenAI-compatible API the runner serves, with the host, the port and the API path already composed. A consumer hands it to a client library as its base URL.
modelstring—是Name a request must ask the runner for, which is the OCI model reference as the Aggregate wrote it, on both targets.
protocolstring—否URL scheme to reach `host` and `port` over, for a consumer composing its own address rather than reading `endpoint`.

uses 套接字

此组件用于建立连接的依赖套接字。通过某个套接字接入的每个连接,其目标都必须满足该套接字的标签选择器,且每个连接都可以在该套接字声明的槽位中携带附加项。必需槽位须由 Aggregate 或 Release 通过该套接字接入的每个连接来填充。

未声明 uses 套接字。

附加槽位

Feature 附加到此组件时所用的命名绑定点。槽位的选择器限定哪个 Feature 可以填充该槽位,其 inject 列表则指明 Feature 的内容可以如何交付。必需槽位必须在每个实例上完成绑定,可以通过实例上的附加,也可以通过其上层作用域的附加;敏感槽位则声明为用于处理机密内容。Feature 也可以以任何槽位都未声明的名称进行附加。

未声明附加槽位。

自注入允许列表

env

关系

与其他已发布实体之间的类型化边。没有已发布目标的引用会呈现为断开的边,而不是链接。

使用

被使用

Component 概念参考 →

Aggrega 目录 — 收录组件、功能、配方以及渲染它们的插件的开放索引。

基于共享的 Aggrega 设计系统构建。

隐私