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). 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:), and the image definition (build:). 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.0.0 or newer: it is the runtime published as a package, and the authoring API the scaffolded model.py is written against.--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