Skip to content

Commit 529da2d

Browse files
admin-spaceaevesdockerglours
authored
docs: clarify Model Runner template customization (#24333) (#24351)
Add common scenarios (GPU scheduling, storage sizing, service exposure, policy alignment) to guide customization choices. Related issues or tickets Fixes #24333 --------- Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> Co-authored-by: Guillaume Lours <705411+glours@users.noreply.github.com>
1 parent 8a7680a commit 529da2d

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

content/manuals/compose/bridge/customize.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ This canonical YAML output serves as the input for Compose Bridge transformation
5656
# access a nested attribute using dot notation
5757
{{ if eq $service.deploy.mode "global" }}
5858
kind: DaemonSet
59-
{{ end }}
60-
{{ end }}
59+
{{ end }}
60+
{{ end }}
6161
```
6262

6363
You can check the [Compose Specification JSON schema](https://github.com/compose-spec/compose-go/blob/main/schema/compose-spec.json) for a full overview of the Compose model. This schema outlines all possible configurations and their data types in the Compose model.
@@ -125,13 +125,18 @@ $ docker compose bridge convert --transformations mycompany/transform
125125

126126
The default transformation also includes templates for applications that use LLMs:
127127

128-
- `model-runner-deployment.tmpl`
129-
- `model-runner-service.tmpl`
130-
- `model-runner-pvc.tmpl`
131-
- `/overlays/model-runner/kustomization.yaml`
132-
- `/overlays/desktop/deployment.tmpl`
128+
- `model-runner-deployment.tmpl`: Generates the Kubernetes deployment for Docker Model Runner. Customize it to change replica counts, image tags, resource requests and limits, GPU scheduling settings, tolerations, or additional environment variables.
129+
- `model-runner-service.tmpl`: Builds the service that exposes Docker Model Runner. Update it to switch between `ClusterIP`, `NodePort`, or `LoadBalancer` types, adjust ports, or add annotations for ingress and service meshes.
130+
- `model-runner-pvc.tmpl`: Defines the persistent volume claim used to store downloaded models. Edit it to set storage size, storage class, access modes, or volume annotations required by your storage provider.
131+
- `/overlays/model-runner/kustomization.yaml`: Kustomize overlay applied when you deploy Model Runner to a standalone Kubernetes cluster. Extend it to add patches for labels and annotations, attach `NetworkPolicies`, or include extra manifests.
132+
- `/overlays/desktop/deployment.tmpl`: Desktop-specific deployment template that keeps the in-cluster Model Runner scaled down and points workloads to the host endpoint. Adjust it if you change the Desktop endpoint or want to deploy Model Runner on Desktop instead of relying on the host service.
133+
134+
Common customization scenarios:
133135

134-
These templates can be extended or replaced to change how Docker Model Runner is deployed or configured.
136+
- Enable GPU support by adding vendor-specific resource requests, limits, and node selectors in `model-runner-deployment.tmpl`.
137+
- Increase or tune storage for model artifacts by editing `model-runner-pvc.tmpl` to set the desired size, storage class, or access mode.
138+
- Expose Model Runner outside the cluster by switching the service type in `model-runner-service.tmpl` or adding ingress annotations in the model-runner overlay.
139+
- Align cluster policies by adding labels, annotations, or NetworkPolicies through `/overlays/model-runner/kustomization.yaml`.
135140

136141
For more details, see [Use Model Runner](use-model-runner.md).
137142

0 commit comments

Comments
 (0)