Skip to main content

Description

Publish a release of a model - image + weights, all in one command:
  1. registers the release tag (idempotent),
  2. mints short-lived ECR push credentials,
  3. builds the image (or loads --source) and pushes to the partner slot,
  4. records the digested image ref on the server,
  5. optionally uploads weights (see --weights below).
Workspace-aware: When run from a workspace (any directory under one containing a reactor.yaml, stopping at the enclosing repository root) with no positional argument, the model name and release tag are taken from the file’s model.name and model.version fields, so you can simply type reactor model publish. An explicit <name>:<release> on the command line can override the workspace release tag, but its <name> part must match the workspace model.name or the command is rejected. Image source (step 3): The image is built from reactor.yaml’s build: block, with the Dockerfile generated in memory and never written to the workspace. A Dockerfile on disk takes the build over: the workspace ./Dockerfile is built verbatim when it exists, -f/--dockerfile builds an explicit path, and either way reactor.yaml’s build fields are ignored with a stderr note naming them. --no-dockerfile builds from reactor.yaml even when a ./Dockerfile exists, and is mutually exclusive with -f. --source skips the build entirely and loads an existing image. --build-secret supplies a build secret (id=<id>,env=<var> grammar - see reactor build --help); required whenever the Dockerfile (on-disk or generated) declares a secret mount, such as a build.run hook with one. Ignored with --source. Weights (step 5):
  • --weights <path>: Upload weights from this file or directory for this release. Without it, the weights step is skipped and reactor model deploy reuses the previously deployed release’s weights (upload new ones later with reactor weights upload if they changed).
  • --force: Re-upload weights even when the target release already has a matching bundle on the server (only meaningful with --weights).
Examples:

Options

Global options

See also