All Products
Search
Document Center

Global Accelerator:Use GA to accelerate cross-border pulling of models or container images for PAI-DSW

Last Updated:Sep 16, 2026

When you create a Platform for AI - Data Science Workshop (PAI-DSW) instance using a container image hosted outside the Chinese mainland (for example, a docker.io image), or pull an overseas model (for example, a huggingface.co model) inside a PAI-DSW instance, access may fail due to cross-border network issues. To resolve this, you can create a Global Accelerator (GA) instance and use its worldwide network acceleration service to give PAI-DSW cross-border access to models and images.

Important notice

Please comply with laws and regulations when accessing the internet. Websites that contain illegal content cannot be accessed.

Scenario example

The following steps use Hugging Face and Docker as examples. You can configure acceleration as needed. The domains to be accelerated are listed below:

Resource to accelerate

Domain to accelerate

Hugging Face

huggingface.co, cdn-lfs.hf.co (the CDN domain of Hugging Face)

Docker

docker.io, registry-1.docker.io, auth.docker.io

Configure GA to accelerate custom domain names

When you create a standard pay-as-you-go Global Accelerator instance, you can select a configuration mode in the Configure Listeners step.

All endpoints accelerated in this topic are domain names outside the Chinese mainland, so quick domain mode is recommended. To set different forwarding priorities, weights, or health checks for different domain names, select standard configuration mode and manually configure endpoint groups and forwarding rules.

Configuration mode

Scenarios

Description

Quick Domain Mode

(Recommended in this topic)

All endpoints are custom domain names and no custom forwarding rules are required.

Creates a TCP listener on ports 80 and 443 in a single step, and automatically creates an endpoint group and an exact-match Host forwarding rule for each domain name. This mode supports only domain name endpoints. You cannot add other endpoint types such as IP addresses or ECS instances.

Standard Configuration Mode (for complex architectures)

Hybrid architectures, canary releases, and high-availability designs.

Supports all endpoint types (domain names, IP addresses, ECS instances, SLB instances, OSS buckets, and more). You can customize weights and health checks and design multi-region disaster recovery.

Take note of the following when you use Quick Domain Mode:

  • ICP filing: The filing requirements are unchanged. If the acceleration areas include regions in the Chinese mainland, the accelerated domain names must still complete ICP filing.

  • Quotas: The number of endpoint groups and forwarding rules that are automatically created is subject to the endpoint group and forwarding rule quotas of a single listener.

  • Configuration rules: Only exact domain names (such as docker.io) are supported. A domain name cannot contain a protocol prefix (such as http://), a path (such as /path), or a port number (such as :443). Duplicate domain names in the same region are automatically deduplicated.

Quick domain configuration

  1. Go to the GA console - Instances page.

  2. Click Create Standard Pay-as-you-go Instance and configure GA Instance Name, Accelerated IP Address Type - EIP.

  3. On the Configure Acceleration Area page, set Acceleration Area to the region where your DSW instance resides. Based on your business requirements, configure the Maximum Bandwidth, IP Protocol, and ISP Line Type for the selected acceleration area.

  4. On the Configure Listeners page, set Configuration Mode to Quick Domain Mode:

    To configure domain names for different regions, click Add Region to add another pair of Endpoint Group Region and Accelerated Domain.
    In Quick Domain Mode, the creation wizard no longer includes the step for configuring endpoint groups. Endpoint groups are created automatically by the system.
    • Endpoint Group Region: This topic uses China (Hong Kong).

    • Accelerated Domain: Enter the domain names to accelerate, one per line. This topic uses huggingface.co, cdn-lfs.hf.co, docker.io, registry-1.docker.io, and auth.docker.io.

  5. After you complete the configuration, click Submit on the Configuration Review page. The instance is created after you complete the payment.

  6. After the instance is created, the system automatically completes the following configurations without manual operations. You can view the automatically created resources on the Endpoint Group and Forwarding Rule tabs of the listener details page.

    • A TCP listener that uses ports 80 and 443 is created.

    • Within the same region, the domain name in the first row is created as the default endpoint group, and the remaining domain names are created as virtual endpoint groups. For each endpoint, Backend Service Type is set to custom domain name and Backend Service is set to that domain name.

    • An exact-match Host forwarding rule is created for each domain name, bound to the listener, and pointed to the corresponding endpoint group.

To accelerate new domain names later, you do not need to create another instance.

  1. Go to the Global Accelerator console - Instances page and click the ID of the target instance.

  2. Click the Listeners tab and click the ID of the target listener. In the upper-right corner of the listener details page, click Quick Config Custom Domain.

  3. Select a Endpoint Group Region, enter the Accelerated Domain, and click Start Configuration.

    The system creates endpoint groups and exact-match Host forwarding rules for the new domain names based on the same rules used when you create an instance, and binds them to the current listener.

Standard configuration

  1. Create a standard Global Accelerator instance:

    1. Go to the GA console - Instances page.

    2. Click Create Standard Pay-as-you-go Instance and configure GA Instance Name, Accelerated IP Address Type - EIP.

    3. On the Configure Acceleration Area page, set Acceleration Area to the region where your DSW instance resides. Based on your business requirements, configure the Maximum Bandwidth, IP Protocol, and ISP Line Type for the selected acceleration area.

    4. On the Configure Listeners page, set Configuration Mode to Standard Configuration Mode (for complex architectures). Enter a listener name, set Protocol to TCP, and set Port to 80,443. You can adjust these settings based on your business requirements.

    5. On the Configure an Endpoint Group page, this topic sets Region to China (Hong Kong) and Endpoint Configuration to a domain name that you want to accelerate. Configure one domain name first, such as huggingface.co. You can configure additional domain names later by adding virtual endpoint groups.

      Set Backend Service Type to Custom Domain Name, enter the domain name to accelerate for Backend Service, and leave Weight (Valid values: 0 to 255) at its default value.

    6. After you complete the configuration, click Submit on the Configuration Review page.

  2. Add virtual endpoint groups:

    1. On the GA console - Instances page, click the ID of the GA instance that you just created, click the Listeners tab, click the ID of the listener that you created, and then click the Endpoint Group tab. The default endpoint group for huggingface.co, which was configured when you created the instance, is already listed.

    2. Add a separate virtual endpoint group for each of the other domain names to accelerate. In this topic, the remaining domain names to add are cdn-lfs.hf.co, docker.io, registry-1.docker.io, and auth.docker.io. Click Add Virtual Endpoint Group. This topic sets Region to China (Hong Kong), sets Backend Service Type to Custom Domain Name, enters the domain name to accelerate for Backend Service, and leaves Weight (Valid values: 0 to 255) at its default value. Add the other domain names to accelerate in the same way. After you finish, four virtual endpoint groups exist.

  3. Configure forwarding rules:

    On the listener configuration page, click the Forwarding Rule tab and click Add Forwarding Rule for each of the five domain names to accelerate. Set If (Matching All Conditions) to Exact Match and enter the domain name to accelerate. Set Then to Forward and select the endpoint group that corresponds to the domain name.

    After you complete the configuration, five forwarding rules exist:

    • Domain name auth.docker.io is forwarded to virtual endpoint group auth_docker_io.

    • Domain name registry-1.docker.io is forwarded to virtual endpoint group registry-1_docker_io.

    • Domain name docker.io is forwarded to virtual endpoint group docker_io.

    • Domain name cdn-lfs.hf.co is forwarded to virtual endpoint group cdn-lfs_hf_co.

    • Domain name huggingface.co is forwarded to the default endpoint group.

Use GA to accelerate access from PAI-DSW

Acceleration method

Method 1: Modify the hosts file of the DSW instance to accelerate access

Method 2: Use PrivateZone to accelerate access

Applicable scenario

Obtain overseas models or other resources in an existing DSW instance.

Create a DSW instance by using an overseas image, and obtain overseas models or other resources in the DSW instance.

Does DSW require VPC, security group, and vSwitch configurations?

Optional

Required

Does DSW require NAT Gateway and SNAT configurations?

Optional. When you download large files, the network speed may be insufficient. You can Improve internet access with a private gateway.

Method 1: Modify the hosts file of the DSW instance to accelerate access

  1. Obtain the acceleration IP. In the Global Accelerator console, click the name of the created instance > Acceleration Region, and select any Acceleration IP.

  2. Modify the hosts file of the DSW instance. Open the DSW instance, run vim /etc/hosts in the Terminal, add the acceleration IP and the domain name to be accelerated to the file, and then save and exit. Example:

    120.27.23xxx0 huggingface.co
    120.27.238.xxx cdn-lfs.hf.co
    

Method 2: Use PrivateZone to accelerate access

  1. Obtain the CNAME acceleration domain name of the Global Accelerator instance. In the Global Accelerator console, click the name of the created instance, and obtain CNAME on the Instance Information tab.

  2. Obtain the VPC information of the DSW instance. For an existing instance, click the instance name and view the VPC information on the Instance Settings page.

  3. Add domain names and resolution records in PrivateZone. Log on to the Alibaba Cloud DNS console. On the PrivateZone User Domains page, click Add Domain Name.

    Use huggingface.co and cdn-lfs.hf.co as examples. First, configure the built-in authoritative domain name co. Select the VPC used by the DSW instance obtained in Step 2 for Effective in Alibaba Cloud VPC, and click OK.

    If you have not created a DSW instance, select the same VPC as the PrivateZone when you create the instance later.

    Then, click the name of the built-in authoritative domain name co to go to the configuration page, and click Add Record. Because huggingface.co and cdn-lfs.hf.co use the same authoritative domain name co, add them to the resolution records one by one.

    • Record Type: Select CNAME.

    • Host Record: Enter the part of the domain name excluding the authoritative domain name, such as huggingface or cdn-lfs.hf.

    • Record Value: Enter the Global Accelerator CNAME obtained in Step 1.

    Configure docker.io, registry-1.docker.io, and auth.docker.io in the same way. You will end up with two built-in authoritative domain names.

Related information