Deploy NeMo Safe Synthesizer Using Parent Helm Chart#

You can deploy NeMo Safe Synthesizer microservice using the Helm chart. The chart manages all required dependencies automatically. Using the chart is the recommended approach for most users.

By default, this deployment enables only Safe Synthesizer microservice and PostgreSQL. All other microservices are explicitly disabled.

Tip

Alternatively, to deploy Safe Synthesizer as part of the entire platform, refer to Install NeMo Microservices Helm Chart and add the --set tags.safe-synthesizer=true argument to the helm install command.

Why Use the Parent Chart?

  • Dependency Management: The parent chart ensures all required services are installed and networked correctly.

  • Simplicity: One command, one values file, minimal manual configuration.

  • Support: This is the officially supported and tested deployment method.

Prerequisites#

Dependencies

  • Kubernetes cluster with Helm installed

  • NGC API key for pulling images

  • Optional: External services if not using the chart-provided dependencies:

    • PostgreSQL: The persistent data store for NeMo Safe Synthesizer.

Kubernetes

  • Create NGC Image pull credentials. This includes the following secrets:

    • A generic secret containing your NGC API key, referenced by existingSecret.

    • An image pull secret, referenced by existingImagePullSecret.

    Create these secrets in the same namespace that you plan to deploy NeMo Safe Synthesizer.

Installation#

  1. Add the NeMo Microservices Helm Chart helm repo:

    $ helm repo add nmp https://helm.ngc.nvidia.com/nvidia/nemo-microservices \
       --username='$oauthtoken' \
       --password=$NGC_API_KEY
    
    helm repo update
    
  2. Create a values.yaml file to enable only NeMo Safe Synthesizer:

    tags:
      platform: false
      safe-synthesizer: true
    
    safe-synthesizer:
      config:
        classify_llm_endpoint_url: https://integrate.api.nvidia.com/v1
        classify_llm_model_id: qwen/qwen2.5-coder-32b-instruct
    
      classify:
        existingSecret: "classify-api-key"
    

    Alternative Configuration Options:

    For using a local NIM reference (assuming you have llama-3.2-3b-instruct deployed locally):

    tags:
      platform: false
      safe-synthesizer: true
    
    safe-synthesizer:
      config:
        classify_llm_endpoint_url: http://modeldeployment-meta-llama-3-2-3b-instruct
        classify_llm_model_id: meta/llama-3.2-3b-instruct
    
      classify:
        apiKey: "placeholder"
    

    As an alternative to creating a values.yaml file and continuing with these steps, you can perform a Tag-Based Helm Installation.

    For information about the values file, refer to NeMo Microservices Helm Chart.

  3. Create the namespace:

    kubectl create namespace nemo-safe-synthesizer
    
  4. Create an image pull secret in the namespace:

    $ kubectl --namespace nemo-safe-synthesizer \
        create secret docker-registry nvcrimagepullsecret \
        --docker-server=nvcr.io \
        --docker-username='$oauthtoken' \
        --docker-password=$NGC_API_KEY
    
  5. (Optional) Create a classify-api-key secret for access to models from build.nvidia.com. This secret is not required if you plan to access locally-deployed models.

    $ kubectl create secret \
        -n nemo-safe-synthesizer \
        generic safe-synthesizer-api-keys \
        --from-literal=NEMO_MICROSERVICES_SAFE_SYNTHESIZER_CLASSIFY_LLM_API_KEY=$NVIDIA_API_KEY
    

    You can get an API key from https://build.nvidia.com/explore/discover.

  6. Install the chart with your custom values file:

    $ helm --namespace nemo-safe-synthesizer \
        install nemo-safe-synthesizer \
        nmp/nemo-microservices-helm-chart \
        -f values.yaml
    

Post-Installation#

  1. Port-forward the service:

    $ kubectl -n nemo-safe-synthesizer \
        port-forward \
        service/nemo-safe-synthesizer \
        8000:8000
    
  2. Verify the deployment:

    • Test the safe synthesis endpoints using the NeMo SDK

    • Verify the classify LLM configuration is working by running a job with the high level SDK

    • Check that the service can connect to your configured model endpoint

You should see the following pods up/completed after running one job successfully

$ kubectl -n nemo-safe-synthesizer get pods
NAME                                           READY   STATUS      RESTARTS   AGE
jobstep-cczazqucfcyy2vfyjpfqfc-q5tm2           0/2     Completed   0          9m10s
nemo-core-api-6c8f97db74-4jzjn                 1/1     Running     0          12m
nemo-core-controller-866bb9d5c7-pnq7q          1/1     Running     0          12m
nemo-core-jobs-logcollector-79868f58c5-ndf5r   1/1     Running     0          12m
nemo-data-store-66895bbb5f-tmrpq               1/1     Running     0          10m
nemo-jobsdb-0                                  1/1     Running     0          12m
nemo-postgresql-0                              1/1     Running     0          12m
nemo-safe-synthesizer-867d5558b5-b72nv         1/1     Running     0          12m