Alibaba Cloud Container Registry (ACR) supports on-demand loading of container images. You can create accelerated versions of your image and decompress image data online instead of downloading the entire image. This improves application distribution efficiency and provides better scalability. When you create a container, you can load the accelerated image on demand, so that containers can start quickly. By default, Platform for AI (PAI) supports this feature. This topic describes how to accelerate your image and use the accelerated image in Data Science Workshop (DSW), Deep Learning Containers (DLC), and Elastic Algorithm Service (EAS).
Prerequisites
PAI (DSW, DLC, or EAS) is activated and a workspace is created. For more information, see Activate PAI and create the default workspace.
The Container Registry service is activated.
A Container Registry Enterprise Edition instance is created. For more information, see Create a Container Registry Enterprise Edition instance.
NoteThe Container Registry Enterprise Edition instance must be of Advanced Edition.
The virtual private cloud (VPC) of the ACK cluster or ACK Serverless cluster is configured for the Container Registry Enterprise Edition instance. Accelerated images must be used in VPCs. For more information, see Configure a VPC ACL.
Enable image acceleration
You can enable image acceleration for a repository. This way, each image that is pushed to the repository is automatically converted to an accelerated image. The time required to convert a pushed image to an accelerated image depends on the size of the pushed image. The conversion does not affect the original image.
The accelerated image resides in the same namespace and repository as the original image. The tag of the accelerated image is the tag of the original image suffixed with _accelerated.
Log on to the Container Registry console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Instances.
On the Instances page, click the Enterprise Edition instance that you want to manage.
In the left-side navigation pane of the management page of the Container Registry Enterprise Edition instance, choose .
On the Repositories page, find the repository for which you want to enable image acceleration. Click the name of the repository or click Manage in the Actions column.
On the page that appears, click Edit in the upper-left corner.
In the Modify Settings dialog box, turn on Enable image acceleration and click Confirm.
Use accelerated images in DLC, DSW, or EAS
After the image is converted to an accelerated image, the namespace and repository name of the accelerated image are the same as those of the original image. The tag is the original image tag suffixed with _accelerated
. You can use the accelerated image as a custom image in DLC or DSW.
Use an accelerated image to create a DLC job
Create a DLC job in the workspace. The following section describes key parameters. For more information about other parameters, see Create a training job.
Node Image: Select Image Address and specify the accelerated image address. The accelerated image address is the original image URL suffixed with
_accelerated
.VPC: If you select Public Resource Group, you need to configure Virtual Private Cloud (VPC). Select the VPC network that is referenced in the Container Registry Enterprise Edition instance.
Use an accelerated image to create a DSW instance
Create a DSW instance in the workspace. The following section describes key parameters. For more information about other parameters, see Create and manage DSW instances.
Select Image: Select Image Address and specify the accelerated image address. The accelerated image address is the original image URL suffixed with
_accelerated
.Networking: If you set Resource Quota to Public Resource Group, you need to configure the network. Select the VPC network that is referenced in the Container Registry Enterprise Edition instance.
Use an accelerated image to deploy an EAS service
Deploy an EAS service in the workspace. The following section describes key parameters. For more information about other parameters, see Deploy a model service in the PAI console.
Select Image: Select Image Address and specify the accelerated image address. The accelerated image address is the original image URL suffixed with
_accelerated
.VPC Settings: Select the VPC network that is referenced in the Container Registry Enterprise Edition instance.
References
For more information about DLC, DSW, or EAS, see: