domino logo
4.1
  • Tech Ecosystem
  • Deployment-wide Search
  • Get Started
  • Security and Credentials
  • Collaborate
  • Organizations
  • Projects
  • Domino Datasets
  • External Data
  • Workspaces
  • Environments
  • Executions
  • Model APIs
  • Publish
  • Notifications
  • Domino Command Line Interface (CLI)
  • Troubleshooting
  • Get Help
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining

Export Model Image

You can use Domino to export model images built in Domino to an external container registry. These images include all the information needed to run the model including the model code, artifacts, environment, and project files.

Model export APIs

Your CI/CD pipeline or workflow can call Domino’s REST APIs to programmatically build and export the model image. By default, the images are built in Model API format. You can deploy these images in an environment that runs Docker containers.

Build Model Image API

This API builds a Docker image for a model and stores it in Domino’s internal Registry. This can later be fetched from the registry (using other export APIs) by your CI/CD pipeline. The exported image can be deployed in your runtime environment (outside Domino). Your CI/CD pipeline can add more layers to this image to do more customizations (such as adding Auth).

Build model image status API

Given a modelId and modelVersionId, this API returns the status of the build operation.

Build model image logs API

Given a modelId and modelVersionId, this API returns the logs for the build operation.

Export model image API

Use this API to push a model image to a third-party container registry outside Domino. This assumes the image was already built and available in Domino. As part of the API request, provide credentials for your registry to push the image to it. These credentials are not saved in Domino and can have a time to live (TTL) attached.

Export model image status API

Given an exportID, this API returns the status of the export operation.

Export Model Image Logs API

Given an exportID, this API returns the logs for the export operation.

Export model image for Sagemaker API

This API builds a Docker image for a given version of a Model API in an AWS Sagemaker-compliant format, and then exports it to AWS ECR or any third-party container registry outside Domino. As part of the API request, provide credentials for your registry to push the image to it. These credentials are not saved in Domino and can have a time to live (TTL) attached.

Sagemaker can train and then deploy a model to serve requests. Model export functionality in Domino only supports the serve use case since train operation would have already happened in Domino. The image is ready to be deployed in the Sagemaker environment. All the files required to make predictions are packaged in the container.

Note

Export model image for Snowflake

Use this API to export the Model API that you created in Domino to Snowflake as a Snowpark Python UDF for hosting. As part of the API request, you must provide credentials, database, and stage information. These credentials are not saved in Domino.

Publish the Domino model with a prediction function as a Snowpark UDF to Snowflake. You can call this function from your Snowflake application or as part of a SQL query to operate on DataFrames and other scalar or tabular data types used in Snowflake.

See Model Requirements.

Troubleshooting

When you export a Domino model to Amazon Sagemaker and create an endpoint from the exported model, the Sagemaker endpoint might fail with the error The primary container for production variant variant-name-1 did not pass the ping health check.

Use the following steps to work around the issue:

  1. Add USER root in the environment Dockerfile instructions.

  2. Publish the model API from the new instructions.

  3. Export the same image in Sagemaker and create an endpoint.

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.