Skip to main content
Domino can integrate with existing CI/CD workflows and registries outside of Domino. Use Domino’s Model Export API to integrate model development in Domino with other production environments. With a single API call, Domino turns your trained model into a container image with a REST interface that you can deploy into a separate production environment. You may need to host models outside of Domino for specific scenarios such as:
  • Support for sudden bursts in traffic
  • Strict latency and uptime SLAs
  • Security, legal, or locality restrictions

Model export API

Domino’s Model Export API exports Docker images of Domino-built models, model artifacts, project files, dependent packages, base environments, and more. The API registers the images with Domino’s internal image registry. You then fetch it, customize it, and deploy it inside your runtime environment with existing CI/CD pipelines to facilitate tests and production-readiness steps. By default, all files present in a project are copied into the generated model image. The default image includes the specified compute environment, project files, a Flask/Plumber harness that exposes the REST interface, and an authentication and load balancing layer. CI/CD pipeline workflow To control the sizes of such images, include names of specified files in the .modelignore file in the project’s root folder to omit them. Filenames, folder names, or UNIX shell regular expressions are allowed in this file. CI/CD pipeline workflow continued

1. Train the model in Domino

A data scientist creates a project in Domino, associates an environment with it, and conducts multiple experiments to identify the best production model. The data scientist or MLOps engineer then configures the CI/CD pipeline to run through the next steps to deploy the model from the project.

2. Build the model image

Your CI/CD pipeline calls the Build Model Image API to trigger a build process. This call builds and saves the generated model image in Domino’s internal container registry. The API response includes the model ID and the model version ID, which are used to poll for the build status or to fetch build logs. The model build process comprises Preparing, Building, Complete, or Failed. Invoke the build process:
Poll for completion:

3. Export the model image to your registry

After the image is built and registered in Domino’s internal registry, export it to your registry with Domino’s Export Model Image API. The API responds with an export process ID, which is used to poll for the status or fetch export operation logs. As part of a production workflow, ensure the image is first deployed for staging. Invoke the build process:
Poll for completion:

4. Run the exported image in a staging environment

Stand up the image in your test environment, which is often a separate Kubernetes cluster dedicated to stage and test workflows. You can also configure your CI/CD pipeline to customize the image to prepare it for staging. Deploy an exported model Image on an existing Kubernetes cluster with these steps. This export assumes your K8s cluster is running and kubectl is installed. Then create the K8s manifest files, which describe your application & service and use kubectl to deploy them. Use these Sample Kubernetes manifest files and procedures to deploy the Image. my-model-deployment.yaml
my-model-service.yaml
If you pull from a private registry, add a secret to your Kubernetes cluster so the pod can authenticate with the docker registry.

5. Start the deployment and service

Get the URL:
Get the port:
Get the Model URL:

Test the exported model

After the image is up and running, test the deployed model. Sample invocation to test your python model:
The content of the “data” JSON object is the input to your model.

6. Deploy to a production environment

After you test the model in the staging environment and it clears the requisite production criteria, your CI/CD pipeline can deploy the Domino endpoint image to a production environment. If you want to use a separate Kubernetes cluster for this environment, substitute your desired cluster in the Run the exported image in a staging environment and Test the exported model steps.