> This page is for NVIDIA Background Noise Removal on Holoscan for Media, version 2.0.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 2.0.0 (Latest) (default): https://docs.nvidia.com/nim/maxine/bnr-h4m/2.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/maxine/llms.txt.

# NIM Service Chart

The `nvidia-bnr-h4m-service` Helm chart deploys the BNR NIM as a standalone inference service on Kubernetes or Red Hat OpenShift.

- **Input:** Audio stream via SMPTE ST 2110-30.
- **Output:** Enhanced audio via SMPTE ST 2110-30.

This chart can be deployed standalone for integration into a custom media pipeline, or as a subchart of the [End-to-End Demo Chart](/nim/maxine/bnr-h4m/installation/bnr-h4m-sample).

---

## Installation

### Prerequisites

Complete all prerequisite steps (Rivermax license, image pull and model pull secrets, high-speed network attachment) before running `helm install`. For details, refer to [Getting Started](/nim/maxine/bnr-h4m/getting-started).

### Pull the Chart

If not already done, add the Helm repository and pull the chart.

```bash
helm pull nim-repo/nvidia-bnr-h4m-service --version 2.0.0
```


For the full repository setup, refer to [Pull Helm Charts](/nim/maxine/bnr-h4m/installation#pull-helm-charts).

The downloaded `.tgz` is referenced directly in the following installation commands.

### Helm Installation

Default deployment (NMOS mode):

```bash
helm upgrade --install nvidia-bnr-h4m-service \
  nvidia-bnr-h4m-service-2.0.0.tgz
```


With node hostname, network, scheduler, and secret overrides:

```bash
helm upgrade --install nvidia-bnr-h4m-service \
  nvidia-bnr-h4m-service-2.0.0.tgz \
  --set nodeSelector.hostname=<gpu-node-name> \
  --set image.secret=<image-pull-secret> \
  --set schedulerName=<scheduler-name> \
  --set network.name=<multus-net-attach-def> \
  --set ngc.secretName=<model-pull-secret>
```


| `--set` Flag | Purpose | Default |
|---|---|---|
| `nodeSelector.hostname` | Target GPU node. | `example-gpu-node` |
| `image.secret` | Image pull secret (`docker-registry` type) for `nvcr.io`. | `ngc-image-secret` |
| `schedulerName` | Pod `spec.schedulerName`. | `topo-aware-scheduler` |
| `network.name` | Multus `NetworkAttachmentDefinition` for SMPTE ST 2110. | `media-a-tx-net` |
| `ngc.secretName` | Model pull secret (`generic` type) for NGC model download. | `ngc-api-key` |

The chart also creates an endpoint Service named `<appName>-endpoint`. It exposes the NIM HTTP API on port `8000`. When `nmos.enabled=true`, it also exposes the NMOS Node API on port `9010`.

After installation, check the status:

```bash
kubectl get pods -o wide
kubectl rollout status deployment/<appName> --timeout=300s
```

On Red Hat OpenShift, replace `kubectl` with `oc`.

---

## Deployment Modes

| Aspect | SMPTE ST 2110 (static) | NMOS |
|--------|-------------------------|------|
| Values file | `values-st2110.yaml` | `values-nmos.yaml` |
| Stream discovery | Fixed multicast IP addresses and ports in values. | Dynamic discovery via NMOS Connection Manager. |
| Use case | Known network, fixed topology. | Dynamic registration and connection management. |

### SMPTE ST 2110 Static Mode

```bash
helm upgrade --install nvidia-bnr-h4m-service \
  nvidia-bnr-h4m-service-2.0.0.tgz \
  -f values-st2110.yaml
```


### NMOS Mode

```bash
helm upgrade --install nvidia-bnr-h4m-service \
  nvidia-bnr-h4m-service-2.0.0.tgz \
  -f values-nmos.yaml
```


---

## Starter Configuration Files

Copy the appropriate configuration below into `values-st2110.yaml` or `values-nmos.yaml`, adjust the fields for your environment, and pass it to `helm upgrade --install` with `-f`.

### ST 2110 Configuration - Static (values-st2110.yaml)

```yaml
appName: nvidia-bnr-nim-st2110
replicas: 1
nodeSelector:
  hostname: example-gpu-node
schedulerName: topo-aware-scheduler
image:
  repository: nvcr.io/nim/nvidia/bnr-h4m
  tag: "2.0.0"
  pullPolicy: IfNotPresent
  secret: ngc-image-secret

nmos:
  enabled: false
  httpPort: 9010
  seed: nvidia-bnr-nim-st2110
  hostname: bnr-nim.local
  description: BNR-NIM
  label: BNR-NIM

service:
  enabled: true
  type: NodePort
  nimHttpPort: 8000
  nimHttpNodePort: 32516

model:
  type: v2-48k

audio:
  pcmFormat: S24BE
  numChannels: 1

intensityRatio: 1.0

input:
  audio:
    sessionName: audio_in
    localInterfaceName: net1
    hostIp: "234.5.8.9"
    hostPort: 5003
    hostNumSubnetBits: 24

output:
  audio:
    sessionName: audio_out
    localInterfaceName: net1
    hostIp: "234.5.8.9"
    hostPort: 5004
    hostNumSubnetBits: 24

network:
  name: media-a-tx-net

bnr:
  nmosEnabled: false
  nimEnabled: true
```


### NMOS Configuration (values-nmos.yaml)

```yaml
appName: nvidia-bnr-nim-nmos
replicas: 1
nodeSelector:
  hostname: example-gpu-node
schedulerName: topo-aware-scheduler
image:
  repository: nvcr.io/nim/nvidia/bnr-h4m
  tag: "2.0.0"
  pullPolicy: IfNotPresent
  secret: ngc-image-secret

nmos:
  enabled: true
  httpPort: 9010
  seed: nvidia-bnr-nim-nmos
  hostname: bnr-nim.local
  description: BNR-NIM
  label: BNR-NIM

service:
  enabled: true
  type: NodePort
  port: 9010
  nodePort: 32515
  nimHttpPort: 8000
  nimHttpNodePort: 32516

model:
  type: v2-48k

audio:
  pcmFormat: S24BE
  numChannels: 1

intensityRatio: 1.0

input:
  audio:
    sessionName: audio_in

output:
  audio:
    sessionName: audio_out

network:
  name: media-a-tx-net

bnr:
  nmosEnabled: true
  nimEnabled: true
```


<Note>
The audio sample rate is derived from `model.type`: `v2-48k` uses 48000 Hz, and `v2-16k` uses 16000 Hz. Do not set `audio.samplingRate` unless you are diagnosing a chart or runtime issue.
</Note>

---

## Verify

```bash
helm status nvidia-bnr-h4m-service
kubectl get pods -o wide
```

On Red Hat OpenShift, replace `kubectl` with `oc`.

---

## Uninstall

```bash
helm uninstall nvidia-bnr-h4m-service
```

<Note>
The `*-model-cache` and `*-nim-logs` PVCs carry `helm.sh/resource-policy: keep` and are not removed by `helm uninstall`.
</Note>