> This page is for version 0.2.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.utils.server_process

Whether this process is a Gym server worker, and the environment variables that tell it.

The main server process sets these variables before uvicorn starts its workers, so each worker knows its role and the entrypoint it serves.

## Module Contents

### Functions

| Name                                                                                                      | Description |
| --------------------------------------------------------------------------------------------------------- | ----------- |
| [`_has_injected_global_config_env`](#nemo_gym-utils-server_process-_has_injected_global_config_env)       | -           |
| [`get_nemo_gym_fastapi_num_workers`](#nemo_gym-utils-server_process-get_nemo_gym_fastapi_num_workers)     | -           |
| [`is_nemo_gym_fastapi_entrypoint`](#nemo_gym-utils-server_process-is_nemo_gym_fastapi_entrypoint)         | -           |
| [`is_nemo_gym_fastapi_worker`](#nemo_gym-utils-server_process-is_nemo_gym_fastapi_worker)                 | -           |
| [`set_is_nemo_gym_fastapi_entrypoint`](#nemo_gym-utils-server_process-set_is_nemo_gym_fastapi_entrypoint) | -           |
| [`set_is_nemo_gym_fastapi_worker`](#nemo_gym-utils-server_process-set_is_nemo_gym_fastapi_worker)         | -           |
| [`set_nemo_gym_fastapi_num_workers`](#nemo_gym-utils-server_process-set_nemo_gym_fastapi_num_workers)     | -           |

### Data

[`IS_NEMO_GYM_FASTAPI_ENTRYPOINT_KEY_NAME`](#nemo_gym-utils-server_process-IS_NEMO_GYM_FASTAPI_ENTRYPOINT_KEY_NAME)

[`IS_NEMO_GYM_FASTAPI_WORKER_KEY_NAME`](#nemo_gym-utils-server_process-IS_NEMO_GYM_FASTAPI_WORKER_KEY_NAME)

[`NEMO_GYM_FASTAPI_NUM_WORKERS`](#nemo_gym-utils-server_process-NEMO_GYM_FASTAPI_NUM_WORKERS)

### API

```python
nemo_gym.utils.server_process._has_injected_global_config_env() -> bool
```

```python
nemo_gym.utils.server_process.get_nemo_gym_fastapi_num_workers() -> int
```

```python
nemo_gym.utils.server_process.is_nemo_gym_fastapi_entrypoint(
    file: str
) -> bool
```

```python
nemo_gym.utils.server_process.is_nemo_gym_fastapi_worker() -> bool
```

```python
nemo_gym.utils.server_process.set_is_nemo_gym_fastapi_entrypoint(
    file: str
) -> None
```

```python
nemo_gym.utils.server_process.set_is_nemo_gym_fastapi_worker() -> None
```

```python
nemo_gym.utils.server_process.set_nemo_gym_fastapi_num_workers(
    num_workers: int
) -> None
```

```python
nemo_gym.utils.server_process.IS_NEMO_GYM_FASTAPI_ENTRYPOINT_KEY_NAME = 'IS_NEMO_GYM_FASTAPI_ENTRYPOINT'
```

```python
nemo_gym.utils.server_process.IS_NEMO_GYM_FASTAPI_WORKER_KEY_NAME = 'IS_NEMO_GYM_FASTAPI_WORKER'
```

```python
nemo_gym.utils.server_process.NEMO_GYM_FASTAPI_NUM_WORKERS = 'NEMO_GYM_FASTAPI_NUM_WORKERS'
```