All Products
Search
Document Center

Elastic Container Instance:DataCache overview

Last Updated:Apr 01, 2026

DataCache lets you cache large datasets — such as machine learning models — on local storage before creating an elastic container instance. Mount the cached data when you launch the instance to shorten startup time and avoid repeated downloads.

How it works

DataCache decouples data from container images. Instead of bundling your data into an image, you create a DataCache that pulls the data independently. When you deploy an application, mount the DataCache alongside the image cache. If the data changes, re-create the DataCache — no image rebuild required.

When you mount a DataCache, ECI automatically creates a pay-as-you-go cloud disk whose capacity equals the DataCache size. Mounting uses HostPath. The cloud disk is created and released together with the elastic container instance.

Use cases

DataCache is a good fit when:

  • Your application relies on large datasets that are slow to download at startup

  • Data changes frequently and you want to avoid rebuilding container images on each update

  • You want to separate data lifecycle management from application image management

Example: deploying a machine learning model

StepWithout DataCacheWith DataCache
1Download model data to dev environmentCreate a DataCache to pull the model
2Package model + app into a container imagePackage the app only into a container image
3Build image cacheBuild image cache
4Deploy applicationDeploy using the image cache + DataCache

When the model is updated, you only need to re-create the DataCache and remount it — no image rebuild, tag republish, or image cache recreation.

数据缓存概述1.png数据缓存概述2.png

Limitations

  • Default DataCache size is 20 GiB. Creation fails if the data volume exceeds 20 GiB.

  • The cloud disk is released when the elastic container instance is deleted.

  • If you do not set a retention period, the DataCache is retained indefinitely and continues to incur snapshot costs.

Create a DataCache

Configure the following properties when creating a DataCache.

Storage path

Specify a bucket and storage path within that bucket. If no bucket is specified, ECI stores the DataCache in the bucket named default.

Data source

DataCache supports the following data sources:

TypeDescription
URLA direct download link, or a model or dataset on ModelScope or Hugging Face
NASAn Apsara File Storage NAS (NAS) file system
OSSAn Object Storage Service (OSS) bucket
SNAPSHOTAn Alibaba Cloud snapshot

Size

Specify the size based on your actual data volume. The default size is 20 GiB. If your data exceeds the specified size, the DataCache creation fails.

Retention period

By default, a DataCache is retained indefinitely. Set a retention period if you do not plan to use the DataCache long-term, to avoid incurring unnecessary snapshot costs.

Billing

Creating a DataCache

ECI creates temporary resources — an elastic container instance and a cloud disk — and generates a snapshot based on the temporary resources. You are charged for the temporary resources and the snapshot.

Using a DataCache

ECI creates a cloud disk equal in size to the DataCache and mounts it to the elastic container instance. You are charged for the cloud disk and the elastic container instance.

For detailed pricing, see DataCaches.