---
title: Express deployments for model serving endpoints
description: Use express deployments to reduce deployment time for custom model serving endpoints.
canonical_url: https://docs.databricks.com/gcp/en/machine-learning/model-serving/express-deployments
---

# Express deployments for model serving endpoints

Express deployments keep the model serving environment the same as the model training environment for [model serving](https://docs.databricks.com/gcp/en/machine-learning/model-serving/index.md) endpoints. You turn them on by passing `env_pack` when you register the model.

## What are express deployments?

Express deployments package and stage model artifacts in serverless notebook environments during model registration. This moves packaging out of endpoint deployment and keeps the training and serving environments consistent.

Without express deployment, model artifacts and environments are packaged into containers at deployment time, so the serving environment may not match the one used during model training.

## Requirements

Express deployment endpoints have the same requirements as a model serving endpoint. See [Requirements](https://docs.databricks.com/gcp/en/machine-learning/model-serving/create-manage-serving-endpoints.md#requirement).

In addition:

* The model must be a [custom model](https://docs.databricks.com/gcp/en/machine-learning/model-serving/custom-models.md)
* The model must be logged and registered in a [Serverless Notebook](https://docs.databricks.com/gcp/en/compute/serverless/notebooks.md) using [version](https://docs.databricks.com/gcp/en/release-notes/serverless/environment-version/index.md) 3 or later
* The model must be logged and registered with `mlflow>=3.12` and `databricks-sdk>=0.102.0`
* The model must be registered in Unity Catalog and served on CPU compute. Register from a regular serverless notebook.
* The model's max environment size is 200GB

## The `env_pack` parameter

Set `model_info` to the result of logging the model, for example with `mlflow.pyfunc.log_model`. Set `model_name` to the three-level Unity Catalog name of the model, such as `catalog.schema.model`.

Enable express deployment by passing `env_pack` to `register_model`:

```python
import mlflow
from mlflow.utils.env_pack import EnvPackConfig

mlflow.register_model(
    model_info.model_uri,
    model_name,
    env_pack=EnvPackConfig(name="databricks_model_serving"),
)
```

The call returns a `ModelVersion` object for the new model version.

`env_pack` packs and stages the model artifacts and the dependencies you added to the notebook session at registration time, which is why registration takes longer than a call without `env_pack`.

`EnvPackConfig` accepts an `install_dependencies` parameter (`True` by default). When `True`, the model's dependencies are installed in the current environment to confirm the environment is valid.

> [!NOTE]
>
> Registration can fail in workspaces without internet access, or when the model depends on custom libraries, if `install_dependencies` is `True`. In these cases, set `install_dependencies` to `False`.

You can substitute the string `"databricks_model_serving"` for `EnvPackConfig(...)` as a shorthand. It is equivalent to `EnvPackConfig(name="databricks_model_serving", install_dependencies=True)`.

## Compare deployment processes

The following table compares deployments with and without express deployment.

| Aspect                           | Without express deployment                                        | Express deployment                                                                         |
| -------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| When the environment is built    | A container image is built at deployment time.                    | Artifacts and the environment are packaged when you register the model.                    |
| Training and serving environment | The serving environment might not match the training environment. | The serving environment is identical to the notebook environment you registered from.      |
| Deployment time                  | Longer. The deployment waits for a container image build.         | Shorter. The deployment skips the container image build.                                   |
| Registration speed               | No environment packaging.                                         | Typically adds seconds to a minute for packaging, depending on model and environment size. |
| Deployment event log             | Shows container image creation events.                            | Does not show container image creation events.                                             |

Express deployments move the one-time packaging work to model registration, which typically adds seconds to a minute to a `register_model` call, depending on model and environment size. In exchange, the deployment skips the container image build entirely. That build is also a common source of deployment failures (dependency resolution, image build errors). When an express deployment succeeds, the deployment event log contains no container build events. If the deployment falls back to a container build, the log shows those events.

## Additional resources

| Resource                                                                                                                                                      | Description                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Create an endpoint for custom models in Model Serving](https://docs.databricks.com/gcp/en/machine-learning/model-serving/create-manage-serving-endpoints.md) | Create an endpoint that serves a custom model.                                    |
| [Manage endpoints for Model Serving](https://docs.databricks.com/gcp/en/machine-learning/model-serving/manage-serving-endpoints.md)                           | Check an endpoint's status, stop and start it, delete it, or set its permissions. |
