Wrap a repository
Most model repositories worth running will never ship a helmstudio.yaml. You do not need their author's permission to write one: a manifest is a description of a repository, and anyone can write it. This guide writes one for an image model served by a Python server.
Read the repository first
Everything a manifest says is something you would otherwise do by hand from the README: which operating system and chip it supports, which tools it needs, which Python version, how it is built, which checkpoint it downloads, and the command that starts it. Collect those first. A manifest written blind is a manifest that breaks at install.
The manifest
# A manifest written for a repository whose author never wrote one: an
# image model with a Python server, run from a checkout at a pinned commit.
id: tern-studio
name: tern studio
description: Text-to-image through PyTorch on MPS, from someone else's repository.
kinds: [image]
license: Apache-2.0
repo: https://github.com/someone/tern
ref: v0.4.2
submodules: true
requires:
os: [darwin]
arch: [arm64]
tools: [git, uv]
ram_gb: 32
disk_gb: 40
peak_ram_gb: 18
runtime:
framework: pytorch
backends: [mps, cpu]
precision: [bf16]
python:
version: "3.11"
build:
- name: Install the Python dependencies
run: uv sync --frozen
weights:
- name: base
repo: someone/tern-base
dest: tern-base
processes:
- name: server
role: main
heavy: true
cmd: "uv run python -m tern.serve --weights {models.base} --port {port}"
port: { prefer: 8781 }
health: { path: /health, timeout_s: 240 }
ui: /
The repository it names is an illustration, and does not exist. Section by section:
- Who it is.
idis a stable slug, and the file you save locally is named for it.licenseis the repository's own licence. - Where it comes from.
repois anythinggit cloneaccepts.refpins a tag or a commit: it is resolved to a commit before anything is shown or built, so a branch that moves after you approved it does not change what runs.submodules: trueclones them too. - What it needs.
requiresis the operating systems, architectures and tools it runs on, and the memory and disk it needs.peak_ram_gbis what the model occupies once loaded — an estimate is better than nothing, because it is what the arithmetic for switching between heavy studios uses. - What it is built on.
runtimesays the framework and the backends, because PyTorch onmpsand PyTorch oncudaare the same framework and very different claims. - Python.
python.versionmakes helmstudio create an environment withuv, pinned to that version, before any build step. Environments are never shared between studios. - How it is built. Each
buildstep runs in order, and must never prompt: there is no one to answer. A step that fails stops the install, and retrying resumes at the first step that has not succeeded. - Its weights. Each weight is downloaded, or linked to a directory you already have. See weights.
- How it runs. One process here, marked
heavybecause it holds the model. Its command takes its port from{port}and its checkpoint from{models.base}, and its health check has a budget large enough for the model to load. See process groups.
Validate it
helm validate -criteria helmstudio.yaml
helm validate checks the schema, then the rules a schema cannot express: every depends_on names a process, there is no cycle, exactly one process is main and at most one is heavy, every placeholder resolves, and no cwd, weight or smoke test path escapes its root. -criteria then scores the manifest:
| # | Criterion | Required | This manifest: 5 of 7 checkable pass |
|---|---|---|---|
| 1 | A valid manifest with a well-formed id | Yes | Passes |
| 2 | Declares what it needs: tools, memory, disk and its peak | Yes | Passes |
| 3 | Installs from a clean machine with no manual steps | Yes | Not checked: needs the smoke harness, which builds and runs the studio. |
| 4 | Exactly one main process, with a health probe | Yes | Passes |
| 5 | Takes the port it is given | Yes | Passes |
| 6 | Releases its memory when stopped | Yes | Not checked: needs the smoke harness, which builds and runs the studio. |
| 7 | Writes only inside its own roots | Yes | Not checked: needs the smoke harness, which builds and runs the studio. |
| 8 | Declares its licence | Yes | Passes |
| 9 | Requests the minimum capabilities it uses, and no more | Yes | Not checked: needs the studio's source, which is not cloned yet. |
| 10 | Survives a restart with its work intact | No | Not checked: needs the smoke harness, which builds and runs the studio. |
| 11 | Fails legibly when a weight or a tool is missing | No | Not checked: needs the smoke harness, which builds and runs the studio. |
| 12 | Theme conformance: tokens only, both themes | No | Not checked: needs the studio's stylesheets, which are not cloned yet. |
| 13 | Declares a test profile | No | Fails: test.profile is not declared |
| 14 | Uninstalls completely | Yes | Not checked: needs the smoke harness, which builds and runs the studio. |
| 15 | Pins the SDK majors it builds against, and its own ref | No | Fails: undeclared: [sdk] |
Seven criteria can be decided from a manifest alone, and this one passes five. It declares no test.profile, and it pins the repository but not the runtime SDK's major. The other eight need a smoke harness, the studio's source or its stylesheets, so they are not scored, and they say why. See publishing.
Try it
Clone the repository, put the manifest at its root, and run it under helm dev with the checkpoint you already have. See develop in isolation.
In helmstudio
helmstudio's launcher can add the same manifest: import the file, or write it in the editor, which is a form over the schema beside the YAML, validating and scoring the criteria as you type. It saves the manifest locally, where it overrides any registry entry with the same id. There is no release yet, so today the launcher runs from a source build of cmd/helmstudio.
Share it
The file you wrote is the contribution. The repository's author can commit it as helmstudio.yaml, and the registry can point at the repository. Until the author ships one, a registry entry can carry the manifest inline. See publishing.