Before the installation, ensure that the user ID of the runc file is 0.
Currently, only the root user can install and upgrade Ascend Docker Runtime. Select an installation mode as required.
kubectl get node
1 2 | NAME STATUS ROLES AGE VERSION ubuntu Ready worker 23h v1.17.3 |
docker --version # Docker containerd --version # containerd
kubectl describe node <node-name> | grep -i runtime
The installation procedure of Ascend Docker Runtime in the Kubernetes-Docker scenario is the same as that in the Docker scenario.
cd <path to run package>
chmod u+x Ascend-docker-runtime_{version}_linux-{arch}.run
./Ascend-docker-runtime_{version}_linux-{arch}.run --check
1 2 3 4 | [WARNING]: --check is meaningless for ascend-docker-runtime and will be discarded in the future Verifying archive integrity... 100% SHA256 checksums are OK. ... All good. |
./Ascend-docker-runtime_{version}_linux-{arch}.run --install
./Ascend-docker-runtime_{version}_linux-{arch}.run --install --install-path=<path>
The installation is successful if the following information is displayed:
1 2 3 4 | Uncompressing ascend-docker-runtime 100% [INFO]: installing ascend-docker-runtime ... [INFO] ascend-docker-runtime install success |
systemctl daemon-reload && systemctl restart docker
When Ascend Device Plugin is started, the system automatically checks whether Ascend Docker Runtime exists. Therefore, you need to start Ascend Docker Runtime and then Ascend Device Plugin. If Ascend Device Plugin is started before Ascend Docker Runtime, restart Ascend Device Plugin by referring to Ascend Device Plugin.
cd <path to run package>
chmod u+x Ascend-docker-runtime_{version}_linux-{arch}.run
./Ascend-docker-runtime_{version}_linux-{arch}.run --check
[WARNING]: --check is meaningless for ascend-docker-runtime and will be discarded in the future Verifying archive integrity... 100% SHA256 checksums are OK. ... All good.
./Ascend-docker-runtime_{version}_linux-{arch}.run --install --install-scene=containerd
./Ascend-docker-runtime_{version}_linux-{arch}.run --install --install-scene=containerd --install-path=<path>
Uncompressing ascend-docker-runtime 100% [INFO]: installing ascend-docker-runtime ... [INFO] ascend-docker-runtime install success
mkdir /etc/containerd containerd config default > /etc/containerd/config.toml vim /etc/containerd/config.toml
vim /etc/containerd/config.toml
stat -fc %T /sys/fs/cgroup/
For openEuler 24.03 OS, change the value of runtime_type in cgroup v1 to io.containerd.runc.v2.
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runtime.v1.linux"
runtime_engine = ""
runtime_root = ""
privileged_without_host_devices = false
base_runtime_spec = ""
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
[plugins."io.containerd.grpc.v1.cri".cni]
bin_dir = "/opt/cni/bin"
conf_dir = "/etc/cni/net.d"
max_conf_num = 1
conf_template = ""
[plugins."io.containerd.grpc.v1.cri".registry]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["https://registry-1.docker.io"]
[plugins."io.containerd.grpc.v1.cri".image_decryption]
key_model = ""
...
[plugins."io.containerd.monitor.v1.cgroups"]
no_prometheus = false
[plugins."io.containerd.runtime.v1.linux"]
shim = "containerd-shim"
runtime = "/usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime"
runtime_root = ""
no_shim = false
shim_debug = false
[plugins."io.containerd.runtime.v2.task"]
platforms = ["linux/amd64"]
...
[plugins."io.containerd.grpc.v1.cri".containerd.default_runtime.options]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
base_runtime_spec = ""
cni_conf_dir = ""
cni_max_conf_num = 0
container_annotations = []
pod_annotations = []
privileged_without_host_devices = false
runtime_engine = ""
runtime_path = ""
runtime_root = ""
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
BinaryName = "/usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime"
CriuImagePath = ""
CriuPath = ""
CriuWorkPath = ""
IoGid = 0
IoUid = 0
NoNewKeyring = false
NoPivotRoot = false
Root = ""
ShimCgroup = ""
SystemdCgroup = true
...
systemctl daemon-reload && systemctl restart containerd
cd <path to run package>
chmod u+x Ascend-docker-runtime_{version}_linux-{arch}.run
./Ascend-docker-runtime_{version}_linux-{arch}.run --check
[WARNING]: --check is meaningless for ascend-docker-runtime and will be discarded in the future Verifying archive integrity... 100% SHA256 checksums are OK. ... All good.
./Ascend-docker-runtime_{version}_linux-{arch}.run --install --install-scene=containerd
./Ascend-docker-runtime_{version}_linux-{arch}.run --install --install-scene=containerd --install-path=<path>
The specified installation path must be an absolute path.
Uncompressing ascend-docker-runtime 100% [INFO]: installing ascend-docker-runtime ... [INFO] ascend-docker-runtime install success
mkdir /etc/containerd containerd config default > /etc/containerd/config.toml vim /etc/containerd/config.toml
vim /etc/containerd/config.toml
stat -fc %T /sys/fs/cgroup/
For openEuler 24.03 OS, change the value of runtime_type in cgroup v1 to io.containerd.runc.v2.
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runtime.v1.linux"
runtime_engine = ""
runtime_root = ""
privileged_without_host_devices = false
base_runtime_spec = ""
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
[plugins."io.containerd.grpc.v1.cri".cni]
bin_dir = "/opt/cni/bin"
conf_dir = "/etc/cni/net.d"
max_conf_num = 1
conf_template = ""
[plugins."io.containerd.grpc.v1.cri".registry]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["https://registry-1.docker.io"]
[plugins."io.containerd.grpc.v1.cri".image_decryption]
key_model = ""
...
[plugins."io.containerd.monitor.v1.cgroups"]
no_prometheus = false
[plugins."io.containerd.runtime.v1.linux"]
shim = "containerd-shim"
runtime = "/usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime"
runtime_root = ""
no_shim = false
shim_debug = false
[plugins."io.containerd.runtime.v2.task"]
platforms = ["linux/amd64"]
...
[plugins."io.containerd.grpc.v1.cri".containerd.default_runtime.options]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
base_runtime_spec = ""
cni_conf_dir = ""
cni_max_conf_num = 0
container_annotations = []
pod_annotations = []
privileged_without_host_devices = false
runtime_engine = ""
runtime_path = ""
runtime_root = ""
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
BinaryName = "/usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime"
CriuImagePath = ""
CriuPath = ""
CriuWorkPath = ""
IoGid = 0
IoUid = 0
NoNewKeyring = false
NoPivotRoot = false
Root = ""
ShimCgroup = ""
SystemdCgroup = true
...
systemctl stop docker
systemctl daemon-reload && systemctl restart containerd kubelet
For details, see Table 1.
Option |
Description |
|---|---|
--help | -h |
Queries help information. |
--info |
Queries software package build information. This option will be deprecated in a later version. |
--list |
Queries the software package list. This option will be deprecated in a later version. |
--check |
Checks the consistency and integrity of packages. This option will be deprecated in a later version. |
--quiet |
Indicates silent installation, which skips interactive messages. It must be used together with install, uninstall, or upgrade. This option will be deprecated in a later version. |
--tar arg1 [arg2 ...] |
Runs the tar command on the software package. Use the parameters following tar as the command parameters. For example, the --tar xvf command indicates that the .run package will be decompressed to the current directory. This option will be deprecated in a later version. |
--install |
Installs the software package. You can specify the installation path by using --install-path=<path> or use the default installation path. |
--install-path=<path> |
Specifies the installation path.
|
--install-scene=<scene> |
Specifies the installation scenario of Ascend Docker Runtime. The default value is docker.
|
--uninstall |
Uninstalls the software. If the installation path is specified during the installation, you also need to specify the installation path during the uninstallation. The option that specifies the installation path is --install-path=<path>. |
--upgrade |
Upgrades the software. If the installation path is specified during the installation, you also need to specify the installation path during the upgrade. The option that specifies the installation path is --install-path=<path>. |
--config-file-path=<path> |
Directory of the Docker or containerd configuration file. If this option is not specified, the following path is used by default:
|
--install-type=<type> |
This option can be used only when Ascend Docker Runtime is installed or upgraded on the following products:
This option is used to set the default mounted content of Ascend Docker Runtime, and must be used together with --install in the format of --install --install-type=<type>. The values of <type> can be:
|
--ce=<ce> |
|
--version |
Queries the Ascend Docker Runtime version. |