Installing Index SDK

Precautions

  • The user for installing and running Index SDK must meet the following requirements:
    • The user who installs and runs Index SDK must be the same as the user who installs CANN. Otherwise, the CANN access permission may be incorrect when a generated operator is run.
    • You are advised to install and run Index SDK as a common user. Index SDK depends on the dynamic library of the user with low permission for the CANN package. When the root user is used to run programs, the linked dynamic library may be tampered with by the low-permission user.
    • The installation user must own both the directory containing the installation package and the destination directory where the installation will occur.
    • When installing Index SDK, ensure that the ~ directory exists and the installation user has the read and write permissions on this directory.
  • FeatureRetrieval is released as a binary shared library, which can be installed through the RUN package in the path defined by a local user.

Procedure

  1. Log in to the installation environment as the installation user of the software package.
  2. Upload the software package to any directory (for example, /home/work/FeatureRetrieval) in the installation environment and go to the directory where the package is stored.
  3. Grant the execute permission on the software package.
    chmod u+x Ascend-mindxsdk-mxindex_{version}_linux-{arch}.run
  4. Check the consistency and integrity of the software package.
    ./Ascend-mindxsdk-mxindex_{version}_linux-{arch}.run --check

    If the following information is displayed, the software package has passed the verification:

    1
    Verifying archive integrity...  100%   SHA256 checksums are OK. All good.    
    
  5. Create an installation path for the software package.
    • If you do not specify an installation path, the software is installed in the path where the software package is located by default.
    • If you need to specify an installation path, create it first. The installation path /home/work/FeatureRetrieval is used as an example.
      1
      mkdir -p /home/work/FeatureRetrieval
      
  6. Obtain the required Index SDK installation command based on the information in the following table.
    Table 1 Quick installation details

    Product Portfolio

    Product Model

    CPU Type

    Installation Path Specified or Not

    Installation Command

    Atlas 200/300/500 inference product

    Atlas 300I inference card (model 3000)

    AArch64

    Yes

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=310

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=310

    # The default installation path is the directory where the command is executed.

    x86_64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=310
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=310

    # The default installation path is the directory where the command is executed.

    Atlas 300I inference card (model 3010)

    AArch64

    Yes

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=310

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=310

    # The default installation path is the directory where the command is executed.

    x86_64

    Yes

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=310

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=310

    # The default installation path is the directory where the command is executed.

    Atlas inference product

    Atlas 300I Pro inference card

    x86_64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    AArch64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=310P

    # The default installation path is the directory where the command is executed.

    Atlas 300V video analysis card

    x86_64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=310P

    # The default installation path is the directory where the command is executed.

    AArch64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    Atlas 300V Pro video analysis card

    x86_64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    AArch64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    Atlas 300I Duo inference card

    x86_64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    AArch64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    Atlas 200I SoC A1 core board

    x86_64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    AArch64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=310P
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=310P
    

    # The default installation path is the directory where the command is executed.

    Atlas A2 inference products

    Atlas 800I A2 inference server

    x86_64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --install-path=/home/work/FeatureRetrieval --platform=npu_type
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path. npu_type indicates the chip name. You can run the npu-smi info command on the server where the Ascend AI Processor is installed to query the name. Delete the last digit of the queried value of Name, and the remaining part is the value of npu_type.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-x86_64.run --install --platform=npu_type
    

    # The default installation path is the directory where the command is executed. npu_type indicates the chip name. You can run the npu-smi info command on the server where the Ascend AI Processor is installed to query the name. Delete the last digit of the queried value of Name, and the remaining part is the value of npu_type.

    AArch64

    Yes

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=npu_type
    

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path. npu_type indicates the chip name. You can run the npu-smi info command on the server where the Ascend AI Processor is installed to query the name. Delete the last digit of the queried value of Name, and the remaining part is the value of npu_type.

    No

    1
    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=npu_type
    

    # The default installation path is the directory where the command is executed. npu_type indicates the chip name. You can run the npu-smi info command on the server where the Ascend AI Processor is installed to query the name. Delete the last digit of the queried value of Name, and the remaining part is the value of npu_type.

    Atlas 800I A3 SuperPoD Server

    Atlas 800I A3 SuperPoD Server

    AArch64

    Yes

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --install-path=/home/work/FeatureRetrieval --platform=A3

    # The installation path /home/work/FeatureRetrieval is used as an example. Replace it with the actual path.

    No

    ./Ascend-mindxsdk-mxindex_7.2.RC1_linux-aarch64.run --install --platform=A3

    # The default installation path is the directory where the command is executed.

  7. Run the installation command to install the software package. Ensure that the entire installation process is performed by the same user, and only that user is allowed to access the installation and decompression paths.

    The --install command also supports optional options. For details, see Table 2. If you enter an option that is not listed in the table, the installation may be normal or an error may be reported.

  8. If "Do you accept the EULA to install mxIndex?" is displayed during the installation, enter Y or y to accept the EULA and continue the installation. Entering other characters stops the installation and exits the program.
    After the installation is complete, the mxIndex-{version} directory is generated. If the following information is displayed, the software has been installed:
    1
    Install package successfully   
    
  9. Add environment variables of the Index SDK package path. The following uses /home/work/FeatureRetrieval as an example:
    export LD_LIBRARY_PATH=/home/work/FeatureRetrieval/mxIndex/host/lib/:$LD_LIBRARY_PATH

References

Table 2 Options in the --install command

Option

Description

--help | -h

Queries help information.

--info

Queries the package building information.

--list

Queries the file list.

--check

Queries the integrity of the software package.

--quiet|-q

(Optional) Indicates silent installation. If it is used, Huawei Enterprise End User License Agreement (EULA) is agreed by default. The agreement signing process is skipped, and the printed man-machine interaction information is reduced.

--nox11

Discarded

--noexec

Decompresses the software package to the current directory without running the installation script. It is used together with --extract=<path> in the format of --noexec --extract=<path>.

--extract=<path>

Decompresses the software package to a specified directory. It can be used with any of --noexec, --install, and --upgrade.

--tar arg1 [arg2 ...]

Runs the tar command on the software package. Use the options following tar as the command options. For example, the --tar xvf command indicates that the .run package will be decompressed to the current directory.

--version

Queries the version of the Index SDK installation package.

--install

Installs the FeatureRetrieval package.

--install-path=<path>

(Optional) Customizes the root directory of the FeatureRetrieval software package. If this option is not set, the directory where the current command is executed is used by default. The path must start with a slash (/) or tilde (~). The path can contain only letters, digits, and special characters (-_./).

If you do not specify the path, the default path is used.

  • /usr/local/Ascend for the root user
  • ${HOME}/Ascend for a non-root user

If this option is used to specify the installation directory, other users do not have the write permission on the directory. If a common user is specified for installation, the owner of the installation directory must be the current installation user.

--upgrade

Upgrades the FeatureRetrieval software package to the same version as that of Index SDK contained in the installation package.

--platform

Specifies the Ascend AI Processor type.

  • Enter 310 for the Atlas 200/300/500 inference product.
  • Enter 310P for the Atlas inference product.
  • Enter A3 for the Atlas 800I A3 SuperPoD Server.
  • For the Atlas A2 inference products, run the npu-smi info command on the server where the Ascend AI Processor is installed, and then delete the last digit of Name. The obtained value is the value of --platform.

The following options are not displayed in --help. Do not use them directly.

  • --xwin: uses the xwin operating mode.
  • --phase2: performs the second step.