> 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.orchestration.executors.script_templates

## Module Contents

### Functions

| Name                                                                                                      | Description                                             |
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| [`bash_var`](#nemo_gym-orchestration-executors-script_templates-bash_var)                                 | -                                                       |
| [`render_driver_entrypoint`](#nemo_gym-orchestration-executors-script_templates-render_driver_entrypoint) | Render the srun entrypoint for the driver step.         |
| [`render_gym_cmd`](#nemo_gym-orchestration-executors-script_templates-render_gym_cmd)                     | Render a bash array with each argument on its own line. |
| [`render_health_check`](#nemo_gym-orchestration-executors-script_templates-render_health_check)           | -                                                       |

### Data

[`_HEALTH_WAIT_MULTI`](#nemo_gym-orchestration-executors-script_templates-_HEALTH_WAIT_MULTI)

### API

```python
nemo_gym.orchestration.executors.script_templates.bash_var(
    name: str
) -> str
```

```python
nemo_gym.orchestration.executors.script_templates.render_driver_entrypoint(
    repo: str | None,
    ref: str | None,
    prepare_cmd: str | None
) -> str
```

Render the srun entrypoint for the driver step.

When either gym\_install or prepare is needed, wraps everything in a single
bash -c so prepare and run happen in the same srun step and container.

```python
nemo_gym.orchestration.executors.script_templates.render_gym_cmd(
    subcommand: str,
    var_name: str,
    args: list[str]
) -> str
```

Render a bash array with each argument on its own line.

```python
nemo_gym.orchestration.executors.script_templates.render_health_check(
    name: str,
    port: int,
    path: str,
    timeout: int
) -> str
```

```python
nemo_gym.orchestration.executors.script_templates._HEALTH_WAIT_MULTI = '# Wait for {name} (try multiple health endpoints)\necho "Waiting for {name} at ...
```