Ascend Docker Runtime

If Ascend Docker Runtime has been installed, perform the following steps on all nodes where it is installed to check its status.

Procedure

  1. Run the following command to check whether the base image exists:
    docker images | grep ubuntu
    If the following information is displayed, the base image ubuntu:22.04 exists. If the base image does not exist, run the docker pull ubuntu:22.04 command to pull the base image.
    1
    ubuntu              22.04               6526a1858e5d        2 years ago         64.2MB
    
  2. Run the following command to mount the physical processor whose ID is 0 using Ascend Docker Runtime.
    • Docker (or Docker integrated with Kubernetes)
      docker run -it -e ASCEND_VISIBLE_DEVICES=0 ubuntu:22.04 /bin/bash
    • containerd (or containerd integrated with Kubernetes)
      Run the following command to check the current cgroup version:
      stat -fc %T /sys/fs/cgroup/
      • If tmpfs is displayed in the command output, cgroup v1 is used. Run the following command to mount the physical processor:
        1
        ctr run --runtime io.containerd.runtime.v1.linux -t --env ASCEND_VISIBLE_DEVICES=0 ubuntu:22.04 containerID
        
      • If cgroup2fs is displayed in the command output, cgroup v2 is used. Run the following command to mount the physical processor:
        1
        ctr run --runtime io.containerd.runc.v2 --runc-binary /usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime -t --env ASCEND_VISIBLE_DEVICES=0 ubuntu:22.04 containerID
        
    • ASCEND_VISIBLE_DEVICES indicates the ID of the mounted processor.
    • containerID indicates the user-defined container ID.
  3. Run the following command to check whether the processor is successfully mounted:
    ls /dev

    If the command output contains the davinci0 field, the processor is successfully mounted, Ascend Docker Runtime is successfully installed, and the component functions properly.