All Products
Search
Document Center

Platform For AI:Pull overseas models and container images in DSW

Last Updated:Jun 02, 2026

DSW instances in China may fail to access overseas resources such as Hugging Face models or Docker images. Create a Global Accelerator (GA) instance to enable DSW to access models and images across domains.

Important

Use network resources responsibly. You cannot access websites that contain illegal information.

Billing

GA is billed separately. Fees include instance fees, capacity unit (CU) fees, and data transfer fees. For more information, see Global Accelerator Billing.

Procedure

The following steps accelerate access to Hugging Face and Docker. Adjust the settings as needed. The table below lists the domain names that require acceleration.

Resource to accelerate

Domain names to accelerate

Hugging Face

huggingface.co, cdn-lfs.hf.co (the CDN distribution domain name for Hugging Face)

Docker

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

Step 1: Create a standard Global Accelerator instance

Only key configurations are described here. For all parameters, see Create and manage standard Global Accelerator instances.

  1. To create a standard instance, activate Global Accelerator and log on to the console. Click Create Standard Pay-as-you-go Instance. Configure basic information, such as the instance name, and click Next.

    image

  2. In the Acceleration Area section, select the region of your DSW instance, specify the bandwidth, and click Next.

    image

  3. Enter a listener name. Set Protocol to TCP and Port to 80,443. Adjust as needed.

    image

  4. Configure the endpoint.

    • Region: Select a region outside China. US (Silicon Valley) is recommended.

    • Endpoint Configuration: Configure a domain name for acceleration. To add more domain names, create virtual endpoint groups.

      • Set Backend Service Type to Custom Domain Name.

      • For Backend Service, enter the domain name that you want to accelerate, such as huggingface.co.

      • Use the default value for Weight.

    image

  5. Review the settings and click Submit.

    image

Step 2: Add virtual endpoint groups and configure forwarding rules

  1. In the left-side navigation pane, click Standard Instances > Instances. Click your instance name, then click the Listeners tab.

    image

  2. Click the listener name to open its configuration page, then click the Endpoint Group tab. The default endpoint group for huggingface.co from Step 1 is already listed.

    image

    Add a virtual endpoint group for each additional domain name: cdn-lfs.hf.co, docker.io, registry-1.docker.io, and auth.docker.io. Click Add Virtual Endpoint Group.

    • Set Backend Service Type to Custom Domain Name.

    • For Backend Service, enter the domain name that you want to accelerate.

    • Use the default value for Weight.

    image

    Repeat for the remaining domain names. After completion, five virtual endpoint groups are displayed.

    image

  3. On the listener configuration page, click the Forwarding Rule tab. For each domain name, click Add Forwarding Rule.

    • Domain Matching Rule: Exact Match.

    • Forwarding Domain: Enter the domain name to accelerate.

    • Forward to: Select the endpoint group type and endpoint group that correspond to the domain name.

    image

    After completion, five forwarding rules are displayed:

    image

Step 3: Use Global Accelerator in DSW

Acceleration method

Method 1: Accelerate access by modifying the hosts file of the DSW instance

Method 2: Accelerate access using PrivateZone

Scenarios

Retrieve overseas models or resources in an existing DSW instance.

Create a DSW instance with an overseas image. Retrieve overseas models or resources in a DSW instance.

VPC, security group, and vSwitch required?

Optional

Required

Dedicated gateway and SNAT required?

Optional. For large file downloads with insufficient speed, use a dedicated gateway to improve public network access speed.

Method 1: Accelerate access by modifying the hosts file of the DSW instance

  1. In the Global Accelerator console, click your instance name. On the Acceleration Areas tab, copy an Accelerated IP Address.

    image

  2. Open the DSW web UI. In the Terminal, run vim /etc/hosts. Add the accelerated IP address and the domain names to accelerate, then save and exit. Example format:

    image

Method 2: Accelerate access using PrivateZone

  1. In the Global Accelerator console, click your instance name. On the Instance Information tab, copy the CNAME.

    image

  2. Find the VPC of your DSW instance. For an existing instance, click the instance name and check the Instance Settings page.

    image

  3. Log on to the Alibaba Cloud DNS console. In PrivateZone, go to User Defined Zones and click Add Zone.

    To use huggingface.co and cdn-lfs.hf.co, first configure the built-in authoritative domain co. In Effective in VPCs, select the VPC of your DSW instance from step 2. Click OK.

    If you have not yet created the DSW instance, select this VPC when creating it.

    image

    Click the built-in authoritative domain co to open its configuration page, then click Add Record. Because huggingface.co and cdn-lfs.hf.co share the authoritative domain co, add a DNS record for each.

    • Set the Record Type to CNAME.

    • For Hostname, enter the host portion of the domain name, such as huggingface or cdn-lfs.hf.

    • For Record Values, enter the GA CNAME copied in step 1.

    image

    Repeat for docker.io, registry-1.docker.io, and auth.docker.io. After completion, two Built-in Authoritative Domain Names are displayed.

    image

    image

References