> 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.cli.env

## Module Contents

### Classes

| Name                                                               | Description                                                                                       |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| [`InitEnvironmentConfig`](#nemo_gym-cli-env-InitEnvironmentConfig) | -                                                                                                 |
| [`ManifestCommandConfig`](#nemo_gym-cli-env-ManifestCommandConfig) | -                                                                                                 |
| [`PipListConfig`](#nemo_gym-cli-env-PipListConfig)                 | -                                                                                                 |
| [`RunConfig`](#nemo_gym-cli-env-RunConfig)                         | Start NeMo Gym servers for agents, models, and resources.                                         |
| [`RunHelper`](#nemo_gym-cli-env-RunHelper)                         | -                                                                                                 |
| [`SchemaConfig`](#nemo_gym-cli-env-SchemaConfig)                   | Print a resources server's task-data schema as JSON Schema.                                       |
| [`TestAllConfig`](#nemo_gym-cli-env-TestAllConfig)                 | Run tests for all server modules in the project.                                                  |
| [`TestConfig`](#nemo_gym-cli-env-TestConfig)                       | Test a specific server module by running its pytest suite and optionally validating example data. |

### Functions

| Name                                                                                   | Description                                                                                            |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [`_catalog_payload`](#nemo_gym-cli-env-_catalog_payload)                               | -                                                                                                      |
| [`_collect_model_endpoints`](#nemo_gym-cli-env-_collect_model_endpoints)               | The upstream model endpoints named in the resolved config, as (config key, url) pairs.                 |
| [`_command_overrides`](#nemo_gym-cli-env-_command_overrides)                           | Parse the already-translated local command flags without resolving Gym runtime config.                 |
| [`_delete_server_venv`](#nemo_gym-cli-env-_delete_server_venv)                         | -                                                                                                      |
| [`_display_list_of_paths`](#nemo_gym-cli-env-_display_list_of_paths)                   | -                                                                                                      |
| [`_endpoint_probe_url`](#nemo_gym-cli-env-_endpoint_probe_url)                         | What to GET to find out whether `base_url` is being served.                                            |
| [`_format_pct`](#nemo_gym-cli-env-_format_pct)                                         | -                                                                                                      |
| [`_inspect_environment`](#nemo_gym-cli-env-_inspect_environment)                       | Render one entry from the unified environment catalog.                                                 |
| [`_is_dns_failure`](#nemo_gym-cli-env-_is_dns_failure)                                 | Whether a `requests` connection error was a name that does not resolve.                                |
| [`_manifest_entry`](#nemo_gym-cli-env-_manifest_entry)                                 | -                                                                                                      |
| [`_model_endpoint_timeout_seconds`](#nemo_gym-cli-env-_model_endpoint_timeout_seconds) | How long to wait for model endpoints, from config. 0 or a negative value skips the check.              |
| [`_print_validation_report`](#nemo_gym-cli-env-_print_validation_report)               | -                                                                                                      |
| [`_probe_endpoint`](#nemo_gym-cli-env-_probe_endpoint)                                 | Whether anything answers at `base_url`, and if not, whether waiting could help.                        |
| [`_reject_manifest_command_extras`](#nemo_gym-cli-env-_reject_manifest_command_extras) | -                                                                                                      |
| [`_resolve_server_dir`](#nemo_gym-cli-env-_resolve_server_dir)                         | Resolve a relative server dir (e.g. `resources_servers/&lt;name&gt;`) to an absolute path.             |
| [`_run_manifest_verifier`](#nemo_gym-cli-env-_run_manifest_verifier)                   | -                                                                                                      |
| [`_select_shard`](#nemo_gym-cli-env-_select_shard)                                     | Deterministically select this shard's subset of modules.                                               |
| [`_server_launch_command`](#nemo_gym-cli-env-_server_launch_command)                   | Shell command that sets up a server's venv and starts its entrypoint with that venv's own interpreter. |
| [`_server_spinup_timeout_seconds`](#nemo_gym-cli-env-_server_spinup_timeout_seconds)   | How long to wait for Gym servers to become ready, from config. 0 or a negative value waits forever.    |
| [`_setup_all`](#nemo_gym-cli-env-_setup_all)                                           | Install every selected server's venv the way the suite would, then exit non-zero if any failed.        |
| [`_setup_single`](#nemo_gym-cli-env-_setup_single)                                     | Install one server's venv exactly as `_test_single` does, without running its tests.                   |
| [`_test_single`](#nemo_gym-cli-env-_test_single)                                       | -                                                                                                      |
| [`_validate_data_single`](#nemo_gym-cli-env-_validate_data_single)                     | -                                                                                                      |
| [`_wait_for_model_endpoints`](#nemo_gym-cli-env-_wait_for_model_endpoints)             | Wait for every endpoint to answer. Returns the ones that never did.                                    |
| [`dump_config`](#nemo_gym-cli-env-dump_config)                                         | Display the resolved Hydra configuration for debugging purposes.                                       |
| [`init_environment`](#nemo_gym-cli-env-init_environment)                               | Create a manifest-backed environment or benchmark skeleton.                                            |
| [`init_resources_server`](#nemo_gym-cli-env-init_resources_server)                     | Initialize a new resources server with template files and directory structure.                         |
| [`list_environments`](#nemo_gym-cli-env-list_environments)                             | List or inspect the manifest and legacy environment/benchmark catalog.                                 |
| [`pip_list`](#nemo_gym-cli-env-pip_list)                                               | List packages installed in a server's virtual environment.                                             |
| [`prefetch`](#nemo_gym-cli-env-prefetch)                                               | Pre-warm per-server venvs without starting any servers.                                                |
| [`publish_environment_manifest`](#nemo_gym-cli-env-publish_environment_manifest)       | Run local publication checks and confirm a workload is cataloged.                                      |
| [`run`](#nemo_gym-cli-env-run)                                                         | Start NeMo Gym servers for agents, models, and resources.                                              |
| [`show_schema`](#nemo_gym-cli-env-show_schema)                                         | Print the selected server's `TaskData` schema (see `nemo_gym/task_data.py`).                           |
| [`status`](#nemo_gym-cli-env-status)                                                   | -                                                                                                      |
| [`test`](#nemo_gym-cli-env-test)                                                       | -                                                                                                      |
| [`test_all`](#nemo_gym-cli-env-test_all)                                               | -                                                                                                      |
| [`test_environment_manifest`](#nemo_gym-cli-env-test_environment_manifest)             | Exercise a manifest-backed workload's verifier fixture without starting services.                      |
| [`validate`](#nemo_gym-cli-env-validate)                                               | Validate a manifest-backed workload or a legacy Gym config without starting services.                  |

### Data

[`_BASE_URL_KEY_SUFFIX`](#nemo_gym-cli-env-_BASE_URL_KEY_SUFFIX)

[`_DEFAULT_MODEL_ENDPOINT_READINESS_TIMEOUT_SEC`](#nemo_gym-cli-env-_DEFAULT_MODEL_ENDPOINT_READINESS_TIMEOUT_SEC)

[`_DEFAULT_SERVER_SPINUP_TIMEOUT_SEC`](#nemo_gym-cli-env-_DEFAULT_SERVER_SPINUP_TIMEOUT_SEC)

[`_ENDPOINT_ANSWERING`](#nemo_gym-cli-env-_ENDPOINT_ANSWERING)

[`_ENDPOINT_POLL_INTERVAL_SEC`](#nemo_gym-cli-env-_ENDPOINT_POLL_INTERVAL_SEC)

[`_ENDPOINT_PROBE_TIMEOUT_SEC`](#nemo_gym-cli-env-_ENDPOINT_PROBE_TIMEOUT_SEC)

[`_ENDPOINT_REFUSED`](#nemo_gym-cli-env-_ENDPOINT_REFUSED)

[`_ENDPOINT_UNRESOLVABLE`](#nemo_gym-cli-env-_ENDPOINT_UNRESOLVABLE)

[`_FORCE_KILL_REAP_TIMEOUT_SEC`](#nemo_gym-cli-env-_FORCE_KILL_REAP_TIMEOUT_SEC)

[`_GRACEFUL_SHUTDOWN_TIMEOUT_SEC`](#nemo_gym-cli-env-_GRACEFUL_SHUTDOWN_TIMEOUT_SEC)

[`_MANIFEST_PUBLISH_KEYS`](#nemo_gym-cli-env-_MANIFEST_PUBLISH_KEYS)

[`_MANIFEST_TEST_KEYS`](#nemo_gym-cli-env-_MANIFEST_TEST_KEYS)

[`_MANIFEST_VALIDATE_KEYS`](#nemo_gym-cli-env-_MANIFEST_VALIDATE_KEYS)

[`_MODEL_SERVER_TYPE`](#nemo_gym-cli-env-_MODEL_SERVER_TYPE)

[`_SERVER_PROBE_TIMEOUT_SEC`](#nemo_gym-cli-env-_SERVER_PROBE_TIMEOUT_SEC)

### API

```python
class nemo_gym.cli.env.InitEnvironmentConfig()
```

**Bases:** [BaseNeMoGymCLIConfig](/nemo/gym/nemo-gym/nemo_gym/config_types#nemo_gym-config_types-BaseNeMoGymCLIConfig)

**`higher_is_better`** `Optional[bool] = None`

---

**`profile`** `IntegrationProfile = IntegrationProfile.CUSTOM_GYM_VERIFIER`

---

**`reuse_verifier`** `Optional[str] = None`

---

**`reward_range`** `Optional[Tuple[float, float]] = None`

---

**`scaffold_kind`** `EnvironmentKind`

---

**`scaffold_name`** `str`

---

```python
class nemo_gym.cli.env.ManifestCommandConfig()
```

**Bases:** [BaseNeMoGymCLIConfig](/nemo/gym/nemo-gym/nemo_gym/config_types#nemo_gym-config_types-BaseNeMoGymCLIConfig)

**`catalog_kind`** `Optional[EnvironmentKind] = None`

---

**`manifest_path`** `Optional[Path] = None`

---

**`onboarding_name`** `Optional[str] = None`

---

**`sync`** `bool = False`

---

**`update_expected`** `bool = False`

---

```python
class nemo_gym.cli.env.PipListConfig()
```

**Bases:** [RunConfig](#nemo_gym-cli-env-RunConfig)

**`format`** `Optional[str]`

---

**`outdated`** `bool`

---

```python
class nemo_gym.cli.env.RunConfig()
```

**Bases:** [BaseNeMoGymCLIConfig](/nemo/gym/nemo-gym/nemo_gym/config_types#nemo_gym-config_types-BaseNeMoGymCLIConfig)

Start NeMo Gym servers for agents, models, and resources.

Examples:

```python
config_paths="resources_servers/example_single_tool_call/configs/example_single_tool_call.yaml,\
responses_api_models/openai_model/configs/openai_model.yaml"
gym env start "+config_paths=[${config_paths}]"
```

**`entrypoint`** `str`

---

```python
class nemo_gym.cli.env.RunHelper()
```

**`_head_server`** `Server`

---

**`_head_server_instance`** `HeadServer`

---

**`_head_server_thread`** `Thread`

---

**`_memory_profiler`** `MemoryProfiler | None`

---

**`_memory_profiling_config`** `MemoryProfilingConfig`

---

**`_processes`** `Dict[str, Popen]`

---

**`_server_client`** `ServerClient`

---

**`_server_instance_display_configs`** `List[ServerInstanceDisplayConfig]`

---

**`_telemetry_metrics_enabled`** `bool`

---

```python
nemo_gym.cli.env.RunHelper._start(
    global_config_dict_parser_config: nemo_gym.global_config.GlobalConfigDictParserConfig
) -> None
```

```python
nemo_gym.cli.env.RunHelper._start_memory_profiler() -> None
```

```python
nemo_gym.cli.env.RunHelper.check_http_server_statuses(
    successful_servers: typing.List[str],
    deadline: typing.Optional[float] = None
) -> typing.List[typing.Tuple[str, nemo_gym.server_utils.ServerStatus]]
```

Probe every server not yet ready.

With a `deadline` from `monotonic()`, each probe is capped at the time left before it.
Servers still unprobed once it passes are reported as `timeout` without a request.

```python
nemo_gym.cli.env.RunHelper.display_server_instance_info() -> None
```

```python
nemo_gym.cli.env.RunHelper.poll() -> None
```

```python
nemo_gym.cli.env.RunHelper.run_forever() -> None
```

```python
nemo_gym.cli.env.RunHelper.shutdown() -> None
```

```python
nemo_gym.cli.env.RunHelper.start(
    global_config_dict_parser_config: nemo_gym.global_config.GlobalConfigDictParserConfig
) -> None
```

Start the head server and every configured server, and wait until all of them are ready.

Any failure or interrupt before readiness shuts down everything started so far, then re-raises.
Callers reach their own `shutdown()` only after this returns.
The spawned servers have no process group or atexit handler, so nothing else would stop them.

```python
nemo_gym.cli.env.RunHelper.wait_for_dry_run_spinup() -> None
```

Wait for every dry-run process to finish, and fail if any of them did.

A dry run builds each server's venv and exits, so unlike poll() a finished process is the
expected outcome here and only the exit code separates success from failure.
The code has to be checked: uv creates the venv before installing into it, so a failed
install still leaves an interpreter and an activate script behind.
That venv then satisfies skip\_venv\_if\_present on the next run, and the first symptom is an
ImportError from a server long after the install that caused it.

```python
nemo_gym.cli.env.RunHelper.wait_for_model_endpoints(
    global_config_dict: omegaconf.DictConfig
) -> None
```

Block until every model endpoint named in the config answers, then return.

Reads the bound from `model_endpoint_readiness_timeout_seconds`, where 0 skips the check
entirely. Raises `ConfigError` naming the endpoints that never answered and the config key
each came from. It raises rather than exits because `RunHelper` is imported and driven as a
library, so the caller decides what an unreachable endpoint means; the CLI entrypoints turn
it into an exit.
`start()` shuts down the servers it already spawned before the error reaches the caller.

```python
nemo_gym.cli.env.RunHelper.wait_for_server_readiness(
    global_config_dict: omegaconf.DictConfig
) -> None
```

Mark the head ready only after every managed server and model endpoint is reachable.

```python
nemo_gym.cli.env.RunHelper.wait_for_spinup() -> None
```

```python
class nemo_gym.cli.env.SchemaConfig()
```

**Bases:** [RunConfig](#nemo_gym-cli-env-RunConfig)

Print a resources server's task-data schema as JSON Schema.

Examples:

```python
gym env schema --resources-server example_multi_step
```

```python
class nemo_gym.cli.env.TestAllConfig()
```

**Bases:** [BaseNeMoGymCLIConfig](/nemo/gym/nemo-gym/nemo_gym/config_types#nemo_gym-config_types-BaseNeMoGymCLIConfig)

Run tests for all server modules in the project.

Examples:

```python
gym env test --all
```

**`delete_venvs_after_each_test`** `bool`

---

**`fail_on_total_and_test_mismatch`** `bool`

---

**`num_shards`** `int`

---

**`setup_only`** `bool`

---

**`shard_index`** `int`

---

```python
class nemo_gym.cli.env.TestConfig()
```

**Bases:** [RunConfig](#nemo_gym-cli-env-RunConfig)

Test a specific server module by running its pytest suite and optionally validating example data.

Examples:

```python
gym env test +entrypoint=resources_servers/example_single_tool_call
```

**`_dir_path`** `Path`

---

**`dir_path`** `Path`

---

**`resolved_dir_path`** `Path`

Absolute server dir resolved against the cwd, then the Gym install root.

Use this for filesystem access (reading data, running the suite); use `dir_path` (the
relative entrypoint) for display and example commands shown to the user.

---

**`should_validate_data`** `bool`

---

```python
nemo_gym.cli.env.TestConfig.model_post_init(
    context
)
```

```python
nemo_gym.cli.env._catalog_payload(
    entry: nemo_gym.registry.EnvironmentCatalogEntry
) -> typing.Dict[str, object]
```

```python
nemo_gym.cli.env._collect_model_endpoints(
    global_config_dict: omegaconf.DictConfig
) -> typing.List[typing.Tuple[str, str]]
```

The upstream model endpoints named in the resolved config, as (config key, url) pairs.

`wait_for_spinup` only polls Gym's own servers, and the Gym-side model server answers as soon
as it starts whether or not anything is behind it, so these are the URLs nothing checks.

`base_url` is typed `Union[str, List[str]]` on vllm\_model and the local vLLM servers, where the
list form spreads load across replicas. The local ones default to an empty list and are filled
in after Gym launches vLLM, so an empty list means "not yet" rather than "misconfigured" and is
skipped, as is an unset value.

The key travels with the url because the endpoint that fails may be a judge or user model, and
a message naming `policy_base_url` would then be wrong.

```python
nemo_gym.cli.env._command_overrides() -> omegaconf.DictConfig
```

Parse the already-translated local command flags without resolving Gym runtime config.

```python
nemo_gym.cli.env._delete_server_venv(
    dir_path: pathlib.Path,
    global_config_dict: omegaconf.DictConfig
) -> None
```

```python
nemo_gym.cli.env._display_list_of_paths(
    paths: typing.List[pathlib.Path]
) -> str
```

```python
nemo_gym.cli.env._endpoint_probe_url(
    base_url: str
) -> str
```

What to GET to find out whether `base_url` is being served.

`GET /v1/models` is part of the OpenAI API, so most endpoints behind a `/v1` base URL answer it,
but nothing here depends on that: any HTTP response counts as answering, so an endpoint without
it replies 404 and still passes. URLs that do not end in `/v1` are probed at their root.

```python
nemo_gym.cli.env._format_pct(
    count: int,
    total: int
) -> str
```

```python
nemo_gym.cli.env._inspect_environment(
    name: str,
    entries: typing.Tuple[nemo_gym.registry.EnvironmentCatalogEntry, ...],
    global_config_dict: omegaconf.DictConfig
) -> None
```

Render one entry from the unified environment catalog.

```python
nemo_gym.cli.env._is_dns_failure(
    error: BaseException
) -> bool
```

Whether a `requests` connection error was a name that does not resolve.

`requests` reports this as a `ConnectionError` like any other, with the resolver failure nested
inside, so the cause chain has to be walked rather than the class inspected.

```python
nemo_gym.cli.env._manifest_entry(
    config: nemo_gym.cli.env.ManifestCommandConfig
) -> typing.Optional[nemo_gym.registry.EnvironmentCatalogEntry]
```

```python
nemo_gym.cli.env._model_endpoint_timeout_seconds(
    global_config_dict: omegaconf.DictConfig
) -> float
```

How long to wait for model endpoints, from config. 0 or a negative value skips the check.

An unset key falls back to the same default the config parser applies. A value that is not a
number is a configuration mistake, so it is reported as one rather than surfacing as a
`ValueError` traceback from `float()`.

```python
nemo_gym.cli.env._print_validation_report(
    report: nemo_gym.environment.validation.EnvironmentValidationReport,
    json_output: bool
) -> None
```

```python
nemo_gym.cli.env._probe_endpoint(
    base_url: str,
    timeout_seconds: float = _ENDPOINT_PROBE_TIMEOUT_SEC
) -> str
```

Whether anything answers at `base_url`, and if not, whether waiting could help.

Answering is the bar, not healthy: a 401 or 404 means something is there, and requiring a 200
would reject endpoints that need auth. A completed TLS handshake counts too, even against a
certificate this process does not trust, which is why `SSLError` is checked before
`ConnectionError` it inherits from.

```python
nemo_gym.cli.env._reject_manifest_command_extras(
    command_dict: omegaconf.DictConfig,
    allowed: frozenset[str]
) -> None
```

```python
nemo_gym.cli.env._resolve_server_dir(
    rel_path: pathlib.Path
) -> pathlib.Path
```

Resolve a relative server dir (e.g. `resources_servers/&lt;name&gt;`) to an absolute path.

Searches NEMO\_GYM\_EXTRA\_ROOTS, the current working directory (a user's local server), then the Gym
install root (`PARENT_DIR`) where built-in servers live in both editable and wheel installs. A
directory counts as a server only if it ships an install marker for one of our two venv setups. This
lets `gym env test` find and run built-in (and plugin) servers from any cwd, not just a repo checkout.

```python
nemo_gym.cli.env._run_manifest_verifier(
    entry: nemo_gym.registry.EnvironmentCatalogEntry,
    update_expected: bool,
    validation: nemo_gym.environment.validation.EnvironmentValidationReport | None = None
) -> nemo_gym.environment.onboarding.VerifierReport
```

```python
nemo_gym.cli.env._select_shard(
    dir_paths: typing.List[pathlib.Path],
    shard_index: int,
    num_shards: int
) -> typing.List[pathlib.Path]
```

Deterministically select this shard's subset of modules.

Round-robin (stride) over a sorted list spreads heavy modules across shards more evenly than
contiguous chunks, which balances wall-time when the suite is parallelized across CI runners.

```python
nemo_gym.cli.env._server_launch_command(
    dir_path: pathlib.Path,
    global_config_dict: omegaconf.DictConfig,
    server_name: str,
    entrypoint_fpath: pathlib.Path
) -> str
```

Shell command that sets up a server's venv and starts its entrypoint with that venv's own interpreter.

The interpreter is named explicitly instead of relying on the bare `python` that `source bin/activate`
puts on PATH: a venv copied or moved after creation still names its original prefix in `bin/activate`,
so activating it would silently run a different interpreter than `uv_venv_dir` selected.

```python
nemo_gym.cli.env._server_spinup_timeout_seconds(
    global_config_dict: omegaconf.DictConfig
) -> float
```

How long to wait for Gym servers to become ready, from config. 0 or a negative value waits forever.

An unset or null key falls back to the same default the config parser applies.
Environment interpolation yields a string, so numeric strings are accepted.
Anything else is reported as a `ConfigError` rather than a `TypeError` traceback mid-startup.

```python
nemo_gym.cli.env._setup_all(
    dir_paths: typing.List[pathlib.Path],
    test_all_config: nemo_gym.cli.env.TestAllConfig,
    global_config_dict: omegaconf.DictConfig
) -> None
```

Install every selected server's venv the way the suite would, then exit non-zero if any failed.

The container build runs this to seed its uv cache, so `scripts/ci/server_tests.sh` can create the same
per-server venvs offline. Every server is attempted before failing, so one run reports every gap.

```python
nemo_gym.cli.env._setup_single(
    test_config: nemo_gym.cli.env.TestConfig,
    global_config_dict: omegaconf.DictConfig
) -> subprocess.Popen
```

Install one server's venv exactly as `_test_single` does, without running its tests.

```python
nemo_gym.cli.env._test_single(
    test_config: nemo_gym.cli.env.TestConfig,
    global_config_dict: omegaconf.DictConfig
) -> subprocess.Popen
```

```python
nemo_gym.cli.env._validate_data_single(
    test_config: nemo_gym.cli.env.TestConfig
) -> None
```

```python
nemo_gym.cli.env._wait_for_model_endpoints(
    endpoints: typing.List[typing.Tuple[str, str]],
    timeout_seconds: float,
    poll_interval_seconds: float = _ENDPOINT_POLL_INTERVAL_SEC,
    monotonic = monotonic,
    sleep_fn = sleep
) -> typing.List[typing.Tuple[str, str]]
```

Wait for every endpoint to answer. Returns the ones that never did.

Unresolvable names are reported once and not waited on. Refused connections are waited on,
because an inference server can take minutes to load weights and someone who starts thirty
seconds early should not have to start over.

```python
nemo_gym.cli.env.dump_config()
```

Display the resolved Hydra configuration for debugging purposes.

Examples:

```python
gym env resolve "+config_paths=[<config1>,<config2>]"
```

```python
nemo_gym.cli.env.init_environment() -> None
```

Create a manifest-backed environment or benchmark skeleton.

```python
nemo_gym.cli.env.init_resources_server()
```

Initialize a new resources server with template files and directory structure.

Examples:

```python
gym env init --resources-server my_server
```

```python
nemo_gym.cli.env.list_environments() -> None
```

List or inspect the manifest and legacy environment/benchmark catalog.

```python
nemo_gym.cli.env.pip_list()
```

List packages installed in a server's virtual environment.

```python
nemo_gym.cli.env.prefetch(
    global_config_dict_parser_config: typing.Optional[nemo_gym.global_config.GlobalConfigDictParserConfig] = None
)
```

Pre-warm per-server venvs without starting any servers.

Accepts the same config format as 'gym env start'. For each server in the config,
creates its isolated venv and installs dependencies serially — similar to how
RL's prefetch\_venvs.py installs actor venvs at container build time.

No Ray is initialised and no server processes are started. Intended for use in
Dockerfile builds so venvs are ready at runtime with no network access needed.

Configuration Parameter:
config\_paths (List\[str]): Paths to YAML configuration files. Specify via Hydra: `+config_paths="[file1.yaml,file2.yaml]"`

Examples:

```python
# Pre-warm venvs for a specific config
config_paths="responses_api_models/local_vllm_model/configs/local_vllm_model.yaml,\
resources_servers/math/configs/math.yaml"
gym env prefetch "+config_paths=[${config_paths}]"
```

```python
nemo_gym.cli.env.publish_environment_manifest() -> None
```

Run local publication checks and confirm a workload is cataloged.

```python
nemo_gym.cli.env.run(
    global_config_dict_parser_config: typing.Optional[nemo_gym.global_config.GlobalConfigDictParserConfig] = None
)
```

Start NeMo Gym servers for agents, models, and resources.

This command reads configuration from YAML files specified via `+config_paths` and starts all configured servers.
The configuration files should define server instances with their entrypoints and settings.

Configuration Parameter:
config\_paths (List\[str]): Paths to YAML configuration files. Specify via Hydra: `+config_paths="[file1.yaml,file2.yaml]"`

Examples:

```python
# Start servers with specific configs
config_paths="resources_servers/example_single_tool_call/configs/example_single_tool_call.yaml,\
responses_api_models/openai_model/configs/openai_model.yaml"
gym env start "+config_paths=[${config_paths}]"
```

```python
nemo_gym.cli.env.show_schema()
```

Print the selected server's `TaskData` schema (see `nemo_gym/task_data.py`).

```python
nemo_gym.cli.env.status()
```

```python
nemo_gym.cli.env.test()
```

```python
nemo_gym.cli.env.test_all()
```

```python
nemo_gym.cli.env.test_environment_manifest() -> None
```

Exercise a manifest-backed workload's verifier fixture without starting services.

```python
nemo_gym.cli.env.validate() -> None
```

Validate a manifest-backed workload or a legacy Gym config without starting services.

```python
nemo_gym.cli.env._BASE_URL_KEY_SUFFIX = 'base_url'
```

```python
nemo_gym.cli.env._DEFAULT_MODEL_ENDPOINT_READINESS_TIMEOUT_SEC: float = 600.0
```

```python
nemo_gym.cli.env._DEFAULT_SERVER_SPINUP_TIMEOUT_SEC: float = 600.0
```

```python
nemo_gym.cli.env._ENDPOINT_ANSWERING = 'answering'
```

```python
nemo_gym.cli.env._ENDPOINT_POLL_INTERVAL_SEC: float = 3.0
```

```python
nemo_gym.cli.env._ENDPOINT_PROBE_TIMEOUT_SEC: float = 5.0
```

```python
nemo_gym.cli.env._ENDPOINT_REFUSED = 'refused'
```

```python
nemo_gym.cli.env._ENDPOINT_UNRESOLVABLE = 'unresolvable'
```

```python
nemo_gym.cli.env._FORCE_KILL_REAP_TIMEOUT_SEC: int = 2
```

```python
nemo_gym.cli.env._GRACEFUL_SHUTDOWN_TIMEOUT_SEC: int = 1
```

```python
nemo_gym.cli.env._MANIFEST_PUBLISH_KEYS = frozenset({'onboarding_name', 'catalog_kind', 'json', 'verbose'})
```

```python
nemo_gym.cli.env._MANIFEST_TEST_KEYS = frozenset({'onboarding_name', 'catalog_kind', 'update_expected', 'json', 'verbos...
```

```python
nemo_gym.cli.env._MANIFEST_VALIDATE_KEYS = frozenset({'onboarding_name', 'catalog_kind', 'manifest_path', 'sync', 'json', '...
```

```python
nemo_gym.cli.env._MODEL_SERVER_TYPE = 'responses_api_models'
```

```python
nemo_gym.cli.env._SERVER_PROBE_TIMEOUT_SEC: float = 5.0
```