You can use either of the following methods to prepare an image. After obtaining the image, create node tags, users, log directories, and namespaces for the installed components in sequence.
root@node:/home/ascend-operator# ll
total 41388
drwxr-xr-x 2 root root 4096 Aug 26 20:20 ./
drwxr-xr-x 6 root root 4096 Aug 26 20:20 ../
-r-x------ 1 root root 41992192 Aug 26 02:02 ascend-operator*
-r-------- 1 root root 372291 Aug 26 02:02 ascend-operator-v{version}.yaml
-r-------- 1 root root 482 Aug 26 02:02 Dockerfile
ubuntu 22.04 6526a1858e5d 2 years ago 64.2MB
1 | alpine latest a24bb4013296 2 years ago 5.57MB |
If the preceding base images do not exist, use commands in Table 1 to pull the base images. (To pull images, ensure that the server can connect to the Internet.)
Base Image |
Image Pulling Command |
Description |
|---|---|---|
ubuntu:22.04 |
docker pull ubuntu:22.04 |
The system architecture is automatically identified during image pulling. |
alpine:latest |
|
- |
Product |
Component |
Image Creation Command |
Description |
|---|---|---|---|
Other products |
Ascend Device Plugin |
docker build --no-cache -t ascend-k8sdeviceplugin:{tag} ./
|
{tag} must be consistent with the software package version. For example, if the software package version is 7.3.0, the value of {tag} is v7.3.0. NOTE:
Ensure that GID and UID of HwDmUser and HwBaseUser in Dockerfile-310P-1usoc are the same as those on the physical machine. |
Atlas 200I SoC A1 core board |
docker build --no-cache -t ascend-k8sdeviceplugin:{tag} -f Dockerfile-310P-1usoc ./
|
||
Other products |
NPU Exporter |
docker build --no-cache -t npu-exporter:{tag} ./
|
|
Atlas 200I SoC A1 core board |
docker build --no-cache -t npu-exporter:{tag} -f Dockerfile-310P-1usoc ./
|
||
Other products |
Ascend Operator |
docker build --no-cache -t ascend-operator:{tag} ./
|
|
Resilience Controller |
docker build --no-cache -t resilience-controller:{tag} ./
|
||
NodeD |
docker build --no-cache -t noded:{tag} ./
|
||
ClusterD |
docker build --no-cache -t clusterd:{tag} ./
|
||
Volcano |
Go to the directory where Volcano is decompressed based on the following version:
|
- |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/ Sending build context to Docker daemon 42.37MB Step 1/5 : FROM ubuntu:22.04 as build ---> 1f37bb13f08a Step 2/5 : RUN useradd -d /home/hwMindX -u 9000 -m -s /usr/sbin/nologin hwMindX && usermod root -s /usr/sbin/nologin ---> Running in d43f1927b1fd Removing intermediate container d43f1927b1fd ---> 9f1d64e06ee6 Step 3/5 : COPY ./ascend-operator /usr/local/bin/ ---> 5022b58c516e Step 4/5 : RUN chown -R hwMindX:hwMindX /usr/local/bin/ascend-operator && chmod 500 /usr/local/bin/ascend-operator && chmod 750 /home/hwMindX && echo 'umask 027' >> /etc/profile && echo 'source /etc/profile' >> /home/hwMindX/.bashrc ---> Running in a781bde3dc56 Removing intermediate container a781bde3dc56 ---> 3d7e2ee7a3bd Step 5/5 : USER hwMindX ---> Running in 338954be8d99 Removing intermediate container 338954be8d99 ---> 103f6a2b43a5 Successfully built 103f6a2b43a5 Successfully tagged ascend-operator:v{version} |
docker save noded:v{version} > noded-v{version}-linux-aarch64.tar
scp noded-v{version}-linux-aarch64.tar root@{IP_address_of_the_target_node}:Storage_path
docker load < noded-v{version}-linux-aarch64.tar
The following uses NodeD as an example to describe how to import the offline image.
ctr -n k8s.io images import noded-v{version}-linux-aarch64.tar
Component |
Image Name |
Image Tag |
Node from Which Images Are Pulled |
|---|---|---|---|
Volcano |
Select an image as required: v1.7.0-v7.3.0 v1.9.0-v7.3.0 |
Management node |
|
Ascend Operator |
v7.3.0 |
||
ClusterD |
v7.3.0 |
||
NodeD |
v7.3.0 |
Compute node |
|
NPU Exporter |
v7.3.0 |
||
Ascend Device Plugin |
v7.3.0 |
If you do not have the download permission, apply for the permission as prompted. After your application is approved by the administrator, you can download the images.
docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/ascend-operator:v7.3.0 ascend-operator:v7.3.0
docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/npu-exporter:v7.3.0 npu-exporter:v7.3.0
docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/ascend-k8sdeviceplugin:v7.3.0 ascend-k8sdeviceplugin:v7.3.0
# Change the image tag to v1.9.0-v7.3.0 if Volcano 1.9.0 is required.
docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/vc-controller-manager:v1.7.0-v7.3.0 volcanosh/vc-controller-manager:v1.7.0
docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/vc-scheduler:v1.7.0-v7.3.0 volcanosh/vc-scheduler:v1.7.0
docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/noded:v7.3.0 noded:v7.3.0
docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/clusterd:v7.3.0 clusterd:v7.3.0
docker rmi swr.cn-south-1.myhuaweicloud.com/ascendhub/ascend-operator:v7.3.0
docker rmi swr.cn-south-1.myhuaweicloud.com/ascendhub/npu-exporter:v7.3.0
docker rmi swr.cn-south-1.myhuaweicloud.com/ascendhub/ascend-k8sdeviceplugin:v7.3.0
# Change the image tag to v1.9.0-v7.3.0 if Volcano 1.9.0 is required.
docker rmi swr.cn-south-1.myhuaweicloud.com/ascendhub/vc-controller-manager:v1.7.0-v7.3.0
docker rmi swr.cn-south-1.myhuaweicloud.com/ascendhub/vc-scheduler:v1.7.0-v7.3.0
docker rmi swr.cn-south-1.myhuaweicloud.com/ascendhub/noded:v7.3.0
docker rmi swr.cn-south-1.myhuaweicloud.com/ascendhub/clusterd:v7.3.0
The following uses NodeD as an example to describe how to import the offline image.
docker save noded:v{version} > noded-v{version}-linux-aarch64.tar
ctr -n k8s.io images import noded-v{version}-linux-aarch64.tar