Installing MindX SDK
Prerequisites
- The preparations for the installation are complete. For details, see System Requirements.
- The inference card driver and firmware have been installed in the environment.
- The MindX SDK software package has been obtained. For details, see Obtaining Software Packages.
- The CANN development kit has been installed. For details, see Installing the CANN Development Kit.
- Run the following command to make the environment variables take effect:
# Install Toolkit as the root user: . /usr/local/Ascend/ascend-toolkit/set_env.sh # Install Toolkit as a non-root user: . $HOME/Ascend/ascend-toolkit/set_env.shUse the actual installation path.
If the operating environment is Atlas 500 AI edge station, configure environment variables as follows.
# Run the following command to make the environment variables take effect: . /opt/ascend/nnrt/set_env.sh
Procedure
- You are advised to install and run the tool as a common user.
- {version} indicates the version number of the development kit, and {arch} indicates the OS architecture. Replace them as required.
- The management plane logs related to installation, upgrade, and uninstallation of software packages are saved in the ~/log/mindxsdk/deployment.log file that contains the name of the login user, access address, and host name for subsequent log tracing and auditing.
- For details about how to uninstall MindX SDK, see Upgrading and Uninstalling MindX SDK.
- Log in to the installation environment as the installation user of the software packages.
- Upload MindX SDK to any directory in the installation environment and go to the directory where the development kit is stored.
- Grant the execute permission on the kit.
chmod +x Ascend-mindxsdk-mxmanufacture_{version}_linux-{arch}.run - Run the following command to check the consistency and integrity of the kit:
./Ascend-mindxsdk-mxmanufacture_{version}_linux-{arch}.run --checkIf the following information is displayed, the kit meets the consistency and integrity requirements:
Verifying archive integrity... 100% SHA256 checksums are OK. All good.
- Create an installation path for MindX SDK.
- If you need to specify the installation path, create it first. /home/work/MindX_SDK is an example installation path.
mkdir -p /home/work/MindX_SDK
- If you do not specify an installation path, the software is installed in the path where MindX SDK is located by default.
- If you need to specify the installation path, create it first. /home/work/MindX_SDK is an example installation path.
- Go to the path to which the MindX SDK software package is uploaded and install MindX SDK. The installation path cannot contain spaces.
- If an installation path is specified, run the following command to install the software. /home/work/MindX_SDK is an example installation path.
./Ascend-mindxsdk-mxmanufacture_{version}_linux-{arch}.run --install --install-path=/home/work/MindX_SDK - If no installation path is specified, run the following command to install the software in the current path.
./Ascend-mindxsdk-mxmanufacture_{version}_linux-{arch}.run --install
If the following information is displayed after the installation is complete, the software is successfully installed in the specified or current path:The installation is successfully
For details about the API parameters, see Table 1.
Table 1 API parameters Parameter
Description
--help | -h
Queries help information.
--info
Queries the construction information.
--list
Queries the file list.
--check
Queries the integrity of the kit.
--quiet
Enables the quiet mode.
--noexec
Does not execute internal scripts. Generally, this parameter is used together with the --install and --install-path parameters.
--install
Starts the installation.
--install-path=<path>
Installs the package in the specified path. Generally, this parameter is used together with --install.
- You are advised to use an absolute path to install the MindX SDK. Do not use a relative path when specifying the installation path.
- This parameter conflicts with --version. Do not install the SDK in /tmp.
--uninstall
Performs uninstallation. This parameter is valid only for the installation package in the same directory as the RUN package. For details, see Upgrading and Uninstalling MindX SDK.
--cann-path
Specifies the user-defined CANN installation path. If the CANN installation path is user-defined, use this parameter to import the path, for example, /home/xxx/Ascend. This parameter is valid only for the root user.
--upgrade
Upgrades MindX SDK. For details, see Upgrading and Uninstalling MindX SDK.
When this operation is performed, the SDK RUN package is temporarily installed in the /tmp directory. If an SDK RUN package already exists in the directory, the original one will be uninstalled. You are not advised to install the SDK in the /tmp directory.
--version
Queries the MindX SDK version.
When this operation is performed, the SDK RUN package is temporarily installed in /tmp. Uninstall it after querying the version number.
--choose-gcc=<0,1,2>
Selects the corresponding RUN package based on the GCC version.
- 0 (default value): Automatically selects the corresponding version.
- 1: Installs GCC 4.8.5.
- 2: Installs GCC 7.
--nox11
Does not generate virtual terminals. (This parameter is used in MindStudio, and you are not advised to use this parameter.)
- If an installation path is specified, run the following command to install the software. /home/work/MindX_SDK is an example installation path.
- Make the environment variables take effect.
Go to the mxManufacture installation path and run the following command to make the environment variables of MindX SDK take effect:
source set_env.sh