> This page is for version 0.5.1.
> For other versions, use one of these documentation indexes:
> - Main (default): https://docs.nvidia.com/nemo/gym/main/llms.txt
> - 0.7.0: https://docs.nvidia.com/nemo/gym/v0.7.0/llms.txt
> - 0.6.0: https://docs.nvidia.com/nemo/gym/v0.6.0/llms.txt
> - 0.5.1: https://docs.nvidia.com/nemo/gym/v0.5.1/llms.txt
> - 0.5.0: https://docs.nvidia.com/nemo/gym/v0.5.0/llms.txt
> - 0.4.0: https://docs.nvidia.com/nemo/gym/v0.4.0/llms.txt
> - 0.3.0: https://docs.nvidia.com/nemo/gym/v0.3.0/llms.txt
> - 0.2.1: https://docs.nvidia.com/nemo/gym/v0.2.1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# 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

| Name                                                                | Description                                                                                      |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [`BuildOptions`](#nemo_gym-tasks-harbor-build_options-BuildOptions) | How prepare treats Dockerfiles outside pull and overlay mode: the `builds:` configuration block. |

### Functions

| Name                                                                                                | Description                                                                                           |
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [`_build_setting`](#nemo_gym-tasks-harbor-build_options-_build_setting)                             | -                                                                                                     |
| [`build_options_from_overrides`](#nemo_gym-tasks-harbor-build_options-build_options_from_overrides) | Read the `builds:` block from the configuration the command line names, before the run config exists. |

### Data

[`BUILDS_KEY`](#nemo_gym-tasks-harbor-build_options-BUILDS_KEY)

[`BUILD_SETTINGS`](#nemo_gym-tasks-harbor-build_options-BUILD_SETTINGS)

[`HYDRA_QUIET_OVERRIDES`](#nemo_gym-tasks-harbor-build_options-HYDRA_QUIET_OVERRIDES)

### API

```python
class nemo_gym.tasks.harbor.build_options.BuildOptions(
    enabled: bool = True,
    tool: str | None = None,
    repository: str | None = None,
    platform: str | None = None
)
```

Dataclass

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.

**`enabled`** `bool = True`

---

**`platform`** `str | None = None`

---

**`repository`** `str | None = None`

---

**`tool`** `str | None = None`

---

```python
nemo_gym.tasks.harbor.build_options.BuildOptions.from_config(
    config: collections.abc.Mapping[str, typing.Any] | None
) -> nemo_gym.tasks.harbor.build_options.BuildOptions
```

classmethod

The `builds:` block of a merged configuration dict, applied over the defaults.

`config` is the merged global configuration (`env.yaml`, `--config` files and
`++builds.&lt;setting&gt;=&lt;value&gt;` overrides) or any dict shaped like it; a missing block keeps
every default. Unknown settings and values of the wrong type are refused.

```python
nemo_gym.tasks.harbor.build_options._build_setting(
    block: collections.abc.Mapping[str, typing.Any],
    name: str
) -> str | None
```

```python
nemo_gym.tasks.harbor.build_options.build_options_from_overrides(
    overrides: list[str]
) -> nemo_gym.tasks.harbor.build_options.BuildOptions
```

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.

```python
nemo_gym.tasks.harbor.build_options.BUILDS_KEY = 'builds'
```

```python
nemo_gym.tasks.harbor.build_options.BUILD_SETTINGS = ('tool', 'repository', 'platform', 'enabled')
```

```python
nemo_gym.tasks.harbor.build_options.HYDRA_QUIET_OVERRIDES = ('hydra.run.dir=.', 'hydra.output_subdir=null', 'hydra/job_logging=none', 'hydra...
```