AI Asset Management in Platform for AI (PAI) offers a flexible custom image feature, letting you import existing images or build new ones directly on the platform. This helps you meet diverse development and training needs, enhancing productivity and ease of use.
Overview
The custom image feature in AI Asset Management lets you add images tailored to your specific requirements. You can choose to import an existing image or build a new one:
Import existing images: You first build an image on your local machine or a cloud server and push it to Alibaba Cloud Container Registry (ACR). Then, you register it as a PAI custom image in the PAI console by providing the ACR image information. This method lets you use your existing image resources but is more complex.
Build new images: You simply need to provide the ACR image information, runtime details for the build job, and build configurations in the PAI console. After the build job completes, the image is automatically pushed to ACR and registered as a PAI custom image. This streamlined approach lets you manage custom images entirely within the PAI platform, significantly boosting productivity and convenience.
Permissions
Alibaba Cloud account: The main account has all permissions and requires no additional authorization.
RAM user: The RAM user must be added as a workspace member and granted the required role permissions. For more information, see Manage workspace members and roles.
Register an image: Import an existing image
Go to AI Asset Management - Images. Select a workspace and open the image management page. On the Custom Image tab, click Register Image and select Import Existing Image to register an existing image from Alibaba Cloud Container Registry (ACR) as a PAI custom image.
The following table describes the key parameters.
Parameter | Description |
Image Type |
|
Enterprise Edition Instance/Image Namespace/Image Repository/Image Version/Custom Domain Name | Select an existing Enterprise Edition instance, image namespace, image repository, image version, and custom domain name, or go to the Container Registry console to create them. Note
|
Visibility |
|
Chip Type | You can select CPU, GPU, or PPU to ensure the image runs correctly in the target environment. |
Register an image: Build a new image
Go to AI Asset Management - Images. Select a workspace and open the image management page. On the Custom Image tab, click Register Image and select Build New Image to build a custom image. After the build job completes, the custom image is pushed to Alibaba Cloud Container Registry (ACR) and then registered as a PAI custom image.
The following table describes the key parameters.
Parameter | Description |
Basic information | |
Image Type | Currently, only Enterprise Edition images are supported for image builds. For more information about Enterprise Edition and Personal Edition images, see What is Alibaba Cloud Container Registry (ACR). |
Enterprise Edition Instance/Image Namespace/Image Repository/Custom Domain Name | Select an existing Enterprise Edition instance, image namespace, image repository, and custom domain name, or go to the Container Registry console to create them. Note If a permission error occurs, grant the AliyunContainerRegistryReadOnlyAccess permission to the current RAM user. For more information, see Manage RAM user permissions. |
Visibility |
|
Chip Type | You can select CPU, GPU, or PPU to ensure the image runs correctly in the target environment. |
Runtime information | |
Resources | Select the compute resources for the image build job. We recommend that you choose appropriate resources based on the dependencies or Dockerfile instructions in the Build configurations. For example, if your Dockerfile includes compilation commands, it will require more powerful resources. |
VPC Configuration/Security Group | Select the Virtual Private Cloud (VPC) that the Enterprise Edition instance is associated with. Note If your image build job needs to access the internet (for example, to pull third-party images or install dependencies specified in the Build configurations), you must create an Internet NAT gateway for the VPC, associate an Elastic IP address (EIP), and configure SNAT rules. For more information, see Improve internet access with an Internet NAT gateway. |
Build configurations | |
Build Method |
|
View image build jobs
On the Custom Image tab, click View Task to see the details of your image build jobs.
Click Details in the Actions column for a specific job to open the Image Building Job Details panel.
In the job details panel, click View Logs and View Monitoring to view the logs and monitoring information for the related DLC job.
View custom images
After the image registration is complete, you can find the registered image on the Custom Image tab. You can then use this custom image in your training jobs.
In the Image Address column of the image list, you can find the VPC address for the image. The format is <registry-name>-vpc.<region>.cr.aliyuncs.com/<namespace>/<image>:<tag>. You can use this address to reference the custom image in training jobs.
Related documents
Once you register a PAI custom image, you can use it in a training job. For more information, see Create a training job.