Container Image Acquisition

The most time-consuming operation for container deployment is to create a container image. To enable developers to quickly deploy containers, Ascend Hub presets container images that contain the CANN software and dependencies. You can directly pull the container images from the host to quickly deploy containers.

Before pulling a container image from Ascend Hub, ensure that the installation environment can be connected to the network. If your server cannot directly connect to the external network, you need to configure a network proxy. For details, see Configuring the Docker Proxy.

  1. Log in to Ascend Hub and obtain the container image according to Table 1.
    Table 1 Image list

    Image

    Image Tag

    CANN Version

    ARM/x86 architecture: infer-modelzoo

    21.0.221.0.321.0.422.0.RC1

    5.0.25.0.35.0.45.1.RC1

  2. Click the Image Versions tab. Select the container image corresponding to your CANN version and click Download. Copy the commands for obtaining the permission and downloading the image, and run the command on the host to pull the image.

    If an error similar to the following occurs when you configure the permission to log in to Ascend Hub for image download, perform the following operations to rectify the fault:

    Error response from daemon: Get https://ascendhub.huawei.com/v2/: x509: certificate signed by unknown authority

    Run the vi /etc/docker/daemon.json command and add the Ascend Hub address to insecure-registries in the file, as shown in the following information in bold:

    {
            "registry-mirrors": ["http://docker.mirrors.ustc.edu.cn"],
            "insecure-registries": ["docker.mirrors.ustc.edu.cn", "ascendhub-registry.rnd.huawei.com", "registry.docker-cn.com", "ustc-edu-cn.mirror.aliyuncs.com","ascendhub.huawei.com"],
            "experimental" : true
    }
    After adding the content, run the following commands to restart the Docker:
    sudo systemctl daemon-reload 
    sudo systemctl restart docker
  3. Click the Image Overview tab to learn how to use the image.