Quick Installation Guide

This section provides guidance for users to quickly start the installation using ascend-deployer. For details about the installation process, see Installation Process.

ascend-deployer provides automatic download and one-click installation of OS dependencies and Docker. It also supports online download, installation, and upgrade of drivers, firmware, CANN, MindStudio, MindX DL, and MEF Center software packages.

The restrictions on this quick installation guide are as follows:

  • Do not modify the default configurations.
  • This guide applies only to single-node installation.
  • Install the tool as the root user.
  • The software packages downloaded online are in Ascend community editions. To obtain those in commercial editions, select and download only the OS dependency packages. For details about how to upload the packages, see Preparing Software Packages.
  • Downloading software packages and dependencies requires a large amount of space. Ensure that the available space of the directory to place required packages and dependencies is at least 20 GB. If an error message indicating insufficient space is displayed during the download, configure the space based on the actual situation.

Based on whether the target device running the Linux OS can connect to the network, there are two scenarios:

  • Scenario 1: If the target device can connect to the network, download and install the software on the device.
  • Scenario 2: If the target device cannot connect to the network, download required files on the Windows OS and upload the entire ascend-deployer directory to the target device for installation.

Scenario 1

Ensure that the device to be installed (target device) can connect to the network.

  1. Log in to the target device as the root user.
  2. Click ascend-deployer to obtain the .zip package of ascend-deployer (the latest 5.0.0 version is recommended), upload the package to the target device (Linux), and decompress it.
  3. (Optional) Install the esdk-obs-python package to enable the resumable transmission function of the CANN package to prevent download failures or long re-download time due to large package sizes or network issues. (Ensure that the pip3 command exists in the environment before using the package.)
    pip3 install esdk-obs-python==3.22.2
  4. Go to the ascend-deployer directory and run the download command:
    bash start_download.sh --os-list=<OS1>,<OS2> --download=<PK1>,<PK2>==<Version>

    Run the bash start_download.sh --help command to view the options of <OS1>,<OS2> and <PK1>,<PK2>==<Version>. If you do not specify the software package version, the latest available version of the software package will be downloaded. The following is an example of the download command:

    bash start_download.sh --os-list=Ubuntu_18.04_x86_64 --download=NPU,CANN,MindSpore,MindStudio,TensorFlow,Torch-npu,DL,MEF
    • The --os-list option specifies the OS of the target device, and it is mandatory. The --download option specifies the software packages to be downloaded, and it is optional. Downloading the software packages means that you agree to the terms and conditions of Huawei Enterprise End User License Agreement (EULA).
    • If --download is set to NPU, the system automatically downloads the driver and firmware packages and stores them in the ascend-deployer/ascend_deployer/resources/npu directory. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages.
    • If --download is set to CANN, the system automatically downloads the latest available Toolkit, NNRT, NNAE, kernels, TFPlugin, and Toolbox packages. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages.
    • If --download is set to MindSpore, the system automatically downloads the latest available MindSpore software package. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages.
    • If --download is set to MindStudio, the system automatically downloads the latest available MindStudio software package. Currently, MindStudio can be downloaded and installed by ascend-deployer on the Ubuntu_18.04_x86_64, Ubuntu_18.04_aarch64, Ubuntu_22.04_x86_64, Ubuntu_22.04_aarch64, openEuler_22.03LTS_x86_64, openEuler_22.03LTS_aarch64, and EulerOS_2.8_aarch64 OSs.
    • If --download is set to DL, the system automatically downloads the latest available MindX DL software package. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages. Only Ubuntu_18.04_x86_64, Ubuntu_18.04_aarch64, Ubuntu_20.04_x86_64, Ubuntu_20.04_aarch64, Ubuntu_22.04_x86_64, Ubuntu_22.04_aarch64, openEuler_20.03LTS_x86_64, openEuler_20.03LTS_aarch64, openEuler_22.03LTS_x86_64, openEuler_22.03LTS_aarch64, CentOS_7.6_x86_64, and CentOS_7.6_aarch64 OSs are supported.
    • If --download is set to MEF, the system automatically downloads the latest available MEF Center software package. Only Ubuntu_20.04_x86_64, Ubuntu_20.04_aarch64, openEuler_22.03LTS_x86_64, and openEuler_22.03LTS_aarch64 OSs are supported.
    • ascend-deployer cannot automatically download the x86_64 driver and firmware packages of Atlas A2 training products. If you want to set up an environment in this scenario, refer to method 2 in Preparing Software Packages to upload the driver and firmware packages to the resources directory of ascend-deployer.
    • If --download is set to TensorFlow, the system automatically downloads the latest available TensorFlow software package.
    • If --download is set to Torch-npu, the system automatically downloads the latest available official Torch package and Torch_npu and stores them in the ascend-deployer/ascend_deployer/resources/pylibs directory. Compile the Apex software package according to the instructions at Gitee and place it in the same directory.
  5. If both UID and GID are 1000 and are not occupied, the HwHiAiUser user is automatically created when you run the installation command. If they are occupied, run the following command to manually create HwHiAiUser as the running user for the driver:
    groupadd HwHiAiUser
    useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash

    After the user is created, run the passwd HwHiAiUser command to set the user password. Ensure that the HwHiAiUser account meets security requirements, such as password complexity requirements. The default validity period of a password is 90 days. You can run the chage command to set the validity period. For details, see Setting User Account Validity Period.

  6. Run the installation command.
    bash install.sh --install-scene=auto      // Install the driver, firmware, CANN, MindSpore, TensorFlow, PyTorch, and other required software.
    bash install.sh --install-scene=dl        // Install the driver, firmware, MindX DL-related components, and other required software.
    bash install.sh --install-scene=mef      // Install MEF Center-related components.

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

  7. If CANN and Toolbox need to be installed in a specific scenario, sign Huawei Enterprise End User License Agreement (EULA) to proceed to the installation process. That is, enter y or Y to accept the agreement, or enter any other character to reject the agreement. After you accept the agreement, the installation automatically starts.
    If the current language environment does not meet the requirements, run the following command to configure the default language environment:
    # Set the language to Chinese (simplified).
    export LANG=zh_CN.UTF-8
    # Set the language to English.
    export LANG=en_US.UTF-8
  8. If the driver and firmware need to be installed, run the reboot command to restart the system immediately after the installation is complete.
  9. Perform post-installation configurations. For details, see Performing Required Operations After Installation.

Scenario 2

Ensure that the target device running Windows can connect to the network.

  1. Install Python 3.7 on the Windows OS. Skip this step if Python 3.7 or a later version has been installed.

    Download link: Python 3.7.5

    Complete the installation as prompted. During the installation, select Add Python to environment variables on the Advanced Options screen. Otherwise, you need to manually add environment variables.

  2. (Optional) On the Windows OS, run the cmd command to install the esdk-obs-python package to enable the resumable transmission function of the CANN package to prevent download failures or long re-download time due to large package sizes or network issues.
    pip install esdk-obs-python==3.22.2
  3. Obtain ascend-deployer on the Windows OS.

    Download link: ascend-deployer (The latest 5.0.0 tool package is recommended.)

    Download, decompress, and install the package.

  4. Start downloading.

    Go to the extracted ascend-deployer-{version} directory (ascend-deployer directory for short) and run start_download_ui.bat. On the displayed simple screen, select the OS of the target device and the software packages to be downloaded online, and click Download.

    For example, select Ubuntu_18.04_x86_64 in the OS_LIST column and select the version of NPU, CANN, MindSpore, MindStudio, TensorFlow, Torch-npu, or MindX DL in the PKG_LIST column.

    • If you select a software package in the PKG_LIST column and download it, you agree to the terms and conditions of Huawei Enterprise End User License Agreement (EULA).
    • After you select an NPU version in the PKG_LIST column, the system automatically downloads the driver and firmware packages of matching versions. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages.
    • After you select a CANN version in the PKG_LIST column, the system automatically downloads the Toolkit, NNRT, NNAE, kernels, TFPlugin, and Toolbox packages of matching versions. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages.
    • After you select a MindSpore version in the PKG_LIST column, the system automatically downloads the MindSpore package of the selected version. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages.
    • After you select a MindStudio version in the PKG_LIST column, the system automatically downloads the MindStudio package of the selected version. Currently, MindStudio can be downloaded and installed by ascend-deployer on the Ubuntu_18.04_x86_64, Ubuntu_18.04_aarch64, Ubuntu_22.04_x86_64, Ubuntu_22.04_aarch64, openEuler_22.03LTS_x86_64, openEuler_22.03LTS_aarch64, and EulerOS_2.8_aarch64 OSs.
    • After you select a TensorFlow version in the PKG_LIST column, the system automatically downloads the TensorFlow package of the selected version.
    • After you select a Torch-npu version in the PKG_LIST column, the system automatically downloads the official Torch package and Torch_npu. Compile the Apex software package according to the instructions at Gitee and place it in the same directory.
    • After you select a MindX DL version in the PKG_LIST column, the system automatically downloads related MindX DL packages of the selected version. If the versions of multiple specified software packages do not match, a prompt message will appear and you need to confirm before downloading the packages. Only Ubuntu_18.04_x86_64, Ubuntu_18.04_aarch64, Ubuntu_20.04_x86_64, Ubuntu_20.04_aarch64, Ubuntu_22.04_x86_64, Ubuntu_22.04_aarch64, openEuler_20.03LTS_x86_64, openEuler_20.03LTS_aarch64, openEuler_22.03LTS_x86_64, openEuler_22.03LTS_aarch64, CentOS_7.6_x86_64, and CentOS_7.6_aarch64 OSs are supported.
    • After you select a MEF version in the PKG_LIST column, the system automatically downloads related MEF Center packages of the selected version. Only Ubuntu_20.04_x86_64, Ubuntu_20.04_aarch64, openEuler_22.03LTS_x86_64, and openEuler_22.03LTS_aarch64 OSs are supported.
    • ascend-deployer cannot automatically download the x86_64 driver and firmware packages of Atlas A2 training products. If you want to set up an environment in this scenario, refer to method 2 in Preparing Software Packages to upload the driver and firmware packages to the resources directory of ascend-deployer.
  5. Log in to the target device as the root user and upload the entire ascend-deployer directory on the Windows OS to any directory (for example, ~) on the target device.
  6. If both UID and GID are 1000 and are not occupied, the HwHiAiUser user is automatically created when you run the installation command. If they are occupied, run the following command to manually create HwHiAiUser as the running user for the driver:
    groupadd HwHiAiUser
    useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash

    After the user is created, run the passwd HwHiAiUser command to set the user password. Ensure that the HwHiAiUser account meets security requirements, such as password complexity requirements. The default validity period of a password is 90 days. You can run the chage command to set the validity period. For details, see Setting User Account Validity Period.

  7. Go to ascend-deployer directory (for example, ~/ascend-deployer) and run the installation script.
    bash install.sh --install-scene=auto      // Install the driver, firmware, CANN, MindSpore, TensorFlow, PyTorch, and other required software.
    bash install.sh --install-scene=dl        // Install the driver, firmware, MindX DL-related components, and other required software.
    bash install.sh --install-scene=mef      // Install MEF Center-related components.

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

  8. If CANN and Toolbox need to be installed in a specific scenario, sign Huawei Enterprise End User License Agreement (EULA) to proceed to the installation process. That is, enter y or Y to accept the agreement, or enter any other character to reject the agreement. After you accept the agreement, the installation automatically starts.
    If the current language environment does not meet the requirements, run the following command to configure the default language environment:
    # Set the language to Chinese (simplified).
    export LANG=zh_CN.UTF-8
    # Set the language to English.
    export LANG=en_US.UTF-8
  9. If the driver and firmware need to be installed, run the reboot command to restart the system immediately after the installation is complete.
  10. Perform post-installation configurations. For details, see Performing Required Operations After Installation.