Skip to main content
Everything runs through the reactor CLI. Install it, scaffold a project, and run it. The CLI builds a container with the runtime already inside, so there is nothing to install on your host but the CLI itself and Docker.

Install the CLI

Pinning a release in CI? See Install the CLI.

Scaffold a project

This creates a ready-to-run project:
reactor.yaml describes the image. The scaffolded build: block is one line that pins the runtime release:
reactor.yaml
Build the image covers the full build: block. Bump runtime_version to upgrade the runtime; releases are immutable, so there is no latest to track. The scaffolded model.py is a small working ReactorModel that generates frames on its own and takes one command, so you can stream something before you write any code. Run it first, then replace it with your own model.

Run it

The first run builds the image, which takes a minute. Then the runtime starts and waits:
Nothing is generated yet. The model produces frames only while a client is connected, so the next step is to attach one.

Connect a client

The fastest option is the Reactor Sandbox: open it, pick Local (Direct), and click Connect. Frames start streaming immediately. To build your own frontend, point the JS SDK at your local model with local: true:

The iteration loop

reactor build and reactor run share one image tag, and run reuses whatever image is already there. So the loop is always the same two commands:
1

Edit your model

Change model.py, config.yaml, or anything else in the project.
2

Rebuild

This bakes your current code and dependencies into the image.
3

Run

Boots the image you just built and starts serving on port 8080.
Editing a file does not change the running container, and reactor run on its own will not pick the change up: it reuses the existing image. Chain them while you iterate:

What reactor run actually does

  1. Builds the image defined by the build: block in reactor.yaml if it does not exist yet, and reuses it otherwise.
  2. Starts the container, maps port 8080 to your host, and sets PORT to match.
  3. Inside the container, the runtime reads reactor.yaml and resolves runtime.import (model:MyModel means the class MyModel in model.py).
  4. It calls your model’s load() once, passing the path to runtime.config.
  5. It serves WebRTC signaling on that port and waits.
The runtime reads its settings from environment variables. HOST and PORT name the address it binds, so reactor run --port maps the host port and sets PORT in the container to match. When a client connects, the runtime wakes your run() loop and streams whatever it emits.

Command reference

reactor run starts the model. reactor build builds the image without running it.
Builds target linux/amd64, the platform Reactor serves models on, so on an Apple Silicon Mac the default build runs under emulation. Pass --platform linux/arm64 for a faster local loop, and drop it before publishing.

Next

Model Anatomy

Replace the scaffold with your own model, line by line.

The Run Loop

Emitting frames, batches, and frame rates.

Load Your Weights

Resolve checkpoints the same way locally and in production.

Deploy to Reactor

Register, publish, and go live on Reactor’s GPUs.