Delete NIM Deployment#

Delete a NIM deployment by specifying the namespace and the deployment name of the deployment.

Prerequisites#

Before you can delete a NIM deployment, make sure that you have:

  • Access to the NeMo Deployment Management service through the NeMo platform host if you have installed the NeMo platform or the independent base URL if you have installed the service individually. Store the base URL in an environment variable DEPLOYMENT_BASE_URL.

  • The namespace and name of the deployment to delete.

To Delete a Deployment#

Choose one of the following options of deleting a deployment.

from nemo_microservices import NeMoMicroservices

client = NeMoMicroservices(
    base_url=os.environ["DEPLOYMENT_MANAGEMENT_BASE_URL"],
    inference_base_url=os.environ["NIM_PROXY_BASE_URL"]
)

response = client.deployment.model_deployments.delete(
    "your-nim-deployment",
    namespace="your-namespace"
)
print(response)

Make a DELETE request to the /v1/deployment/model-deployments/<namespace>/<deployment_name> endpoint.

For more details on the request body, see the Deployment Management API reference.

curl -X DELETE \
   "${DEPLOYMENT_BASE_URL}/v1/deployment/model-deployments/<namespace>/<deployment_name>" \
   -H 'accept: application/json' | jq
Example Response
{
   "message": "Resource deleted successfully.",
   "id": "string",
   "deleted_at": "string"
}

For more information about the response of the API, see the Deployment Management API reference.

Tip

The deletion process may take a few minutes to complete. All resources associated with the deployment will be removed.