nemo_gym.tasks.harbor.build_options
nemo_gym.tasks.harbor.build_options
The builds table of the run configuration.
BuildOptions carries whether builds are enabled, which tool to use, the repository to push to and the platform to build for. It is read from a Hydra config mapping and, before the run config exists, from the command line overrides and env.yaml by a side-effect-free Hydra parse. The module depends on the build tool list and the repository variable only.
Module Contents
Classes
Functions
Data
API
How prepare treats Dockerfiles outside pull and overlay mode: the builds: configuration block.
tool builds them (buildah, podman or docker; default: the first one on PATH that fits, see
nemo_gym.tasks.harbor.image_build.detect_tool). repository is the registry path built
images are pushed under (default: the NEMO_GYM_BUILD_REPOSITORY variable; unset keeps them local
in the Docker daemon). platform is passed to the tool (default linux/amd64). With enabled
false nothing is built, and the tasks that need a build are skipped with the loader’s message.
The builds: block of a merged configuration dict, applied over the defaults.
config is the merged global configuration (env.yaml, --config files and
++builds.<setting>=<value> overrides) or any dict shaped like it; a missing block keeps
every default. Unknown settings and values of the wrong type are refused.
Read the builds: block from the configuration the command line names, before the run config exists.
Preparation builds images before the run config can be written, so the global configuration is not
composed yet. This merges the sources the user controls, in the global config’s order (the files
the +config_paths tokens name, from --config and the asset selectors, then env.yaml, then
the +/++ overrides), and reads the block from the result. The full global config is still
parsed once, at dispatch, with the run config added.