Installation and Uninstallation Based on a Kernel Package
The following uses the kernel package with the default name as an example. Replace it with the actual kernel package name during actual running.
- Install the static kernel package.Go to the directory where the static_kernel_${datatime}.run package is stored and run the package as the running user (for example, HwHiAiUser).
./static_kernel_${datatime}.runIf you see information similar to the following, the installation is successful.
1 2
Verifying archive integrity... 100% SHA256 checksums are OK. All good. Uncompressing STATIC KERNEL RUN PACKAGE 100%
Currently, the installation directory cannot be specified. By default, the .run package is installed in ${install_path}/opp/static_kernel. ${install_path} indicates the CANN component directory. Replace it with the actual path.
The default installation path ${install_path}/opp/static_kernel of the .run package uses the default permission 770 (accessed by the current user and users in the same group). If the static kernel package fails to be installed due to lack of permission, contact the installation user of the CANN package to modify the permission on the static_kernel directory.
The following is an example of the directory structure after the .run package is installed:
|-- ${install_path}/opp/static_kernel |-- ai_core |-- config |-- ascendxxxx |-- binary_info_config.json # Indexes of all static kernel packages. |-- config.ini # Configuration file that records the installation sequence. |-- static_kernel_230808110316 # Static kernel file wth the timestamp 230808110316. |-- ascendxxxx | |-- Add # Directory for storing operator binary files. | |-- Add_float16_NCL_xxxx_d0.json | |-- Add_float16_NCL_xxxx_d1.json | |-- Add_float16_NCL_xxxx_d0.o | |-- Add_float16_NCL_xxxx_d1.o | |-- xxxx | |-- xxx.json | |-- xxx.o | |-- ...... |-- config # Index of a single static kernel package. | |-- ascendxxxx | |-- binary_info_config.json |-- scripts # Common scripts. | |-- ...... |-- uninstall.sh # Script for uninstalling a single package. |-- static_kernel_xxxx # Static kernel files with different timestamps. |-- uninstall.sh # Script for uninstalling all packages. |-- version.info # Version information.
Multiple kernel packages can be installed. If two packages contain the same operator kernel, the kernel package installed later is used.
- (Optional) Uninstall a single kernel package or all kernel packages.
- Uninstalling a single package
Go to the directory where the static_kernel_${datatime}.run package is installed and run uninstall.sh as the running user (for example, HwHiAiUser).
cd ${install_path}/opp/static_kernel/ai_core/static_kernel_${datatime} ./uninstall.shIf the uninstallation is successful, the static_kernel_${datatime} folder in the ai_core directory will be deleted.
- Uninstalling all packagesGo to ${install_path}/opp/static_kernel/ai_core and run uninstall.sh as the running user (for example, HwHiAiUser).
cd ${install_path}/opp/static_kernel/ai_core/ ./uninstall.shIf the uninstallation is successful, all content in the ai_core directory will be deleted, and all installed kernel packages will be uninstalled.
- Uninstalling a single package