Description
Scaffold a new Reactor model workspace. With <name>, init creates a new directory called <name> in the current folder and scaffolds into it. Without a name, init scaffolds into the current folder, which must be empty (modulo dotfiles). reactor.yaml names the model as <org>/<name>. A bare <name> takes the org slug of your current credential, looked up live from the Reactor API; the lookup needs the API to be reachable. Pass <org>/<name> to skip the lookup, which creates ./<name>/ and writes the full name. The generated workspace contains model.py, config.yaml, requirements.txt, README.md, .dockerignore, and a reactor.yaml that combines the model registration spec (model:), the runtime entry point (runtime:), the image definition (build:), and a default one-replica deployment plan (deployment:) that ‘reactor model deploy’ applies. There is no Dockerfile: ‘reactor build’ / ‘run’ / ‘publish’ generate one in memory from the build: block and hand it straight to BuildKit. reactor.yaml’s build.runtime_version pins the reactor-runtime release the image installs; bump it there to upgrade. That version must be 3.5.0 or newer: the scaffolded model.py is a ReactorApp on the runtime’s step loop, an authoring API that first shipped in 3.5.0.--dockerfile also writes the generated Dockerfile into the workspace. An
on-disk Dockerfile takes the build over, so it is the way to hand-edit the
image beyond what reactor.yaml can express; the build: fields the generator
would have consumed are then ignored, with a stderr note naming them when any
are set. On an existing workspace, use ‘reactor init --force --dockerfile’;
without --force, init refuses a non-empty directory, and it overwrites the
scaffold’s own files.
Examples:
Options
Global options
See also
- reactor - The CLI for the Reactor platform