motif64

m64_958790edae53 / capsule.toml

43 lines, 2.1 KBraw
# hello-world: the smallest useful capsule. No model, no GPU, no network.## Every capsule is a folder with three required files:#   capsule.toml  this manifest: what the capsule is and what it needs#   start.sh      the entrypoint the container runs#   AGENT.md      the document an agent reads; m64 serves it at /agent# and usually a human/ folder, which m64 serves at /human/.## The folder's id (m64_...) is the hash of its files, so any edit, even to a# comment, gives a new id. Run `m64 hash examples/hello-world` to see it.schema = "m64/capsule@1"# The first sentence is what lists show (cut at 60 characters).description = "Hello world: a capsule that serves its own documentation. No model, no GPU, no network: a chat endpoint that greets you back, its docs for people at /human/ and for agents at /agent. Start here."# The kind decides which routes m64's front lets through: chat = POST# /v1/chat/completions and GET /v1/models. Every other path is a 404, except the# ones the front serves itself (/status, /agent, /human/).kinds = ["chat"]authors = ["motif42"]license = "mit"parent = "m64_ed4181ee0b6290e5c3fc56b74f5d4a05c06203712587c3cce5c4966b32ba83bc"[hardware]# Must equal what `m64 doctor` prints on the machine that serves it; another# platform is refused. On an ARM machine (GB10, Apple-silicon Linux VM...) change# this to "linux-aarch64": the image below is multi-arch, nothing else changes.platform = "linux-aarch64"# No gpu line: this capsule runs on CPU.[runtime]sandbox = "container"# Always pinned by digest, never a bare tag. This is python:3.12-slim (multi-arch# index digest). server.py uses the standard library only, so no Dockerfile.image = "python@sha256:2f17fc044b579bab302c2e8054d3a686e2cb9a83de48e70534b94cd8ebbe06a9"gpu = false# The server inside listens on this port; m64 passes it as $M64_PORT.internal_port = 9000# m64 waits for a 200 here before calling the capsule ready.health = "/health"expected_load_seconds = 5# The front rewrites every request's "model" to this name.model_name = "hello-world"# Never root inside the container: nobody:nogroup.user = "65534:65534"