Description
Publish a model release by building and pushing its image and optionally uploading weights. Use reactor model deploy to deploy the published release. Workspace-aware: When run from a workspace (any directory under one containing areactor.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:
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.
--build-env overrides a build.build_env value for this build,
with the same grammar and rules as reactor build --help.
Repeatable; a bare KEY takes its value from the environment.
Ignored with --source.
Weights:
--weights <path>: Upload weights from this file or directory for this release, or pin an hf://org/repo[@rev] reference and finalize its hub-file manifest; no weight bytes are uploaded. Without it, falls back to the workspace’s runtime.weights_path when reactor.yaml declares one; with neither, the weights step is skipped andreactor model deployreuses the previously deployed release’s weights (upload new ones later withreactor weights uploadif they changed).--no-weights: Skip the weights step even when reactor.yaml declares runtime.weights_path - for a machine that holds no weights, such as a CI agent publishing the image alone. Mutually exclusive with--weights.--force: Re-upload weights even when the target release already has a matching bundle on the server (only meaningful with--weights).
Options
Global options
See also
- reactor model - Model management commands