Running the Installation Command

Notes

  • For batch installation, start from 3 after completing related configurations based on Configuring Batch Installation.
  • For Atlas 300I Pro or Atlas 300V Pro, the cus_npu_info parameter must be set in the inventory_file file in advance. For example, set the cus_npu_info parameter to 300i-pro for Atlas 300I Pro and to 300v-pro for Atlas 300V Pro. The following is an example:
    [ascend]
    localhost ansible_connection='local' cus_npu_info='300i-pro'

Procedure

  1. Log in to the target device as the installation user of the software package.
  2. Upload the entire ascend-deployer directory to the home directory on the target device (for example, $HOME). Skip this step if you use the download function of ascend-deployer on the target device.
    • To use the offline deployment tool as a non-root user, you must have the operation permission on the ascend-deployer directory.
    • If the installation is performed as the root user and other users need to use the Python installed by the root user, set umask to 022 in advance. Before the setting, ensure that the umask permission meets the security requirements of your organization.
  3. (Optional) When installing the driver and CANN software package as the root user, you can specify the running user, user group (HwHiAiUser by default. For details, see Preparing Installation and Running Users.), and installation paths (/usr/local/Ascend by default) for the CANN and toolbox software packages. To specify the information, modify the ascend-deployer/inventory_file file. (The following parameters are valid only when the installation is performed by the root user.) The file content is as follows:
    If the global configuration files /etc/Ascend/ascend_cann_install.info and /etc/Ascend/ascend_toolbox_install.info exist in the installation environment, the install_path parameter is invalid. Use the installation paths specified in the global configuration files.
    [ascend:vars]
    user=HwHiAiUser
    group=HwHiAiUser
    install_path=/usr/local/Ascend

    The installation paths of NPU and edge components (AtlasEdge and HA) cannot be specified. The default installation path of NPU is /usr/local/Ascend, and that of edge components (AtlasEdge and HA) is /usr/local.

  4. Go to the ascend-deployer directory and run the installation script. (The installation user must have the execute permission on the install.sh script.) You can select the installation mode (scenario-specific installation or software-specific installation) based on the site requirements.
    If you use pip to install ascend-deployer on the local target device, run the ascend-deployer command in any path on the local target device to install ascend-deployer. The difference between using pip and installation script is that ./install.sh in the following command can be replaced with ascend-deployer, for example, ascend-deployer --install-scene=auto.
    • Scenario-specific installation (Only for the root user)

      Docker is automatically installed in all scenarios to facilitate container deployment. During the installation, the corresponding Docker group is created.

      ./install.sh --install-scene=<scene_name>

      ascend-deployer provides several basic installation scenarios. For details, see Optional Installation Scenarios. Example command:

      ./install.sh --install-scene=auto       // Automatic installation of all software packages that can be found
    • Software-specific installation
      The root user can install all the software downloaded using ascend-deployer tool. The non-root user can only install the software listed in Table 1. Install sys_pkg (system component) and NPU (driver and firmware, for Ascend devices) as the root user, and then install the software listed in Table 1 as the non-root user.
      Table 1 Software list

      Software

      Description

      Python, GCC

      Python 3.x.x and GCC 7.3.0 are installed in the $HOME/.local/ directory.

      Framework

      It contains TensorFlow, PyTorch, and MindSpore.

      CANN software

      • It includes NNAE, NNRT, TFPlugin, and Toolkit that are installed in the $HOME/Ascend directory.
      • The Toolkit software package of a version earlier than CANN 5.0.1 cannot be installed by a non-root user.

      toolbox

      • It is installed in the $HOME/Ascend directory.
      • When a non-root user installs the toolbox, the installation of the container engine plug-in Ascend Docker Runtime in the tool package will be skipped. If you need to use Ascend Docker Runtime, install the toolbox as the root user.

      MindStudio

      It is installed in the $HOME directory.

      If a non-root user needs to install MindStudio, install MindStudio as the root user (some dependencies need to be installed by the root user) and then install MindStudio as the non-root user.

      ./install.sh --install=<package_name_1>,<package_name_2>

      You can run the ./install.sh --help command to view the options of <package_name_x>. Example command:

      ./install.sh --install=sys_pkg,python,npu     // Install system components, Python, drivers, and firmware.
      ./install.sh --install=toolkit    // Install Toolkit.
      ./install.sh --install=tfplugin    // Install TFPlugin.
      ./install.sh --install=tensorflow    // Install TensorFlow.
      ./install.sh --install=ief         // Install the IEF agent.
      ./install.sh --install=mindstudio      // Install MindStudio.

      After the IEF agent has been installed, log in to the IEF console and choose Edge Resources > Edge Nodes in the navigation pane to view the status of managed edge nodes in the edge node list. If the node status is Running, the management is successful.

      • Install the components in the sequence of sys_pkg > Python > NPU > CANN software (Toolkit and NNRT) > AI frameworks (TensorFlow, MindSpore, and PyTorch).
      • Considering compatibility, the python375 option still exists and has the same function as the python option.
      • The device health status is obtained before the NPU is installed. If the device is faulty, the installation stops.
      • After the NPU is installed, determine whether to reboot the system based on the system prompts. If you need to reboot the system, run the reboot command.
      • Some components require runtime dependencies. For example, an AI framework requires the Toolkit or NNAE to provide runtime dependencies.
      • Ensure that Python has been installed before installing Python libraries, such as PyTorch, TensorFlow, and MindSpore.
      • If --install= is set to mindspore, the MindSpore package downloaded in Downloading Packages will be installed. You can also install it by following the instructions on the MindSpore official website. Pay attention to the version mapping between MindSpore, drivers, firmware, and CANN software.
  5. Run the following command to check whether the specified component works properly:
    ./install.sh --test=<target>

    You can run the ./install.sh --help command to view the options of <target>. Example command:

    ./install.sh --test=toolbox        // Test whether the toolbox is normal.