Quick Installation Guide
This section provides guidance for users to quickly start the installation. For details about the installation process, see Installation Process.
ascend-deployer provides automatic download and installation of the OS dependencies, TensorFlow installation package for the x86 architecture, and Docker as well as driver, firmware, and CANN software packages.
Notes
- Do not modify the default configurations.
- This guide applies only to single-node installation.
- Install the tool as the root user.
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. For details, see Scenario 1.
- 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. For details, see Scenario 2.
Scenario 1
- Ensure that the target device can connect to the network. For details about how to configure a network proxy, see Configuring a System Network Proxy (Linux).
- Ensure Python 3.6 or later and the pip3 command exist in your environment.
- Log in to the target device as the root user.
- Run the pip command to install ascend-deployer.
pip3 install ascend-deployer
- Run the download command.
ascend-download --os-list=<OS1>,<OS2> --download=<PK1>,<PK2>==<Version>
Run the ascend-download --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:
ascend-download --os-list=Ubuntu_18.04_x86_64 --download=MindSpore,MindStudio
Downloading the driver, firmware, and CANN software packages online by specifying --download=CANN must meet many constraints (for details, see Downloading Packages). Therefore, you are advised to download the software packages to be installed by referring to Table 1 and save them to the ascend-deployer/resources directory.
If you want to specify the software package version to be downloaded, pay attention to the version mapping between CANN, MindSpore, and MindStudio. See the following table.
Table 1 Version mapping Software
Matching Version 1
Matching Version 2
Matching Version 3
Matching Version 4
CANN
20.3.0
5.0.1.spc103
5.0.2.1
5.0.3.1
MindSpore
1.1.1
1.2.1
1.3.0
1.5.0
MindStudio
2.0.0
3.0.1
3.0.2
3.0.3
- --os-list specifies the target device OS.
- If --download is set to CANN, the system automatically downloads the latest available npu, toolkit, nnrt, nnae, tfplugin, and toolbox software packages.
- If--download is set to MindSpore, the latest available version of the MindSpore software package is automatically downloaded.
- If --download is set to MindStudio, the latest available version of the MindStudio software package is automatically downloaded. Currently, the ascend-deployer tool is used to download and install MindStudio. Only Ubuntu_18.04_x86_64, Ubuntu_18.04_aarch64, and EulerOS_2.8_aarch64 are supported.
- The ascend-deployer tool cannot automatically download the PyTorch or TensorFlow (AArch64 architecture) installation package. If you want to install PyTorch (torch-1.5.0+*.whl and apex-0.1+*.whl) or TensorFlow for the AArch64 architecture (tensorflow-1.15.0-*.whl), place the compiled .whl package in the ascend-deployer/resources/pylibs directory.
- Create the HwHiAiUser user for running 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.
- Run the installation command.
ascend-deployer --install-scene=auto //Automatic installation of all software packages that can be found
ascend-deployer provides several basic installation scenarios. For details, see Optional Installation Scenarios.
- Perform post-installation configurations. For details, see Post-installation Configuration.
Scenario 2
Ensure that the target device running Windows can connect to the network. For details about how to configure a network proxy, see Configuring a System Network Proxy (Windows).
- Install Python 3.7 on the Windows OS. Skip this step if Python 3.7 or a later version has been installed.
- Obtain ascend-deployer on the Windows OS.
- Start downloading.
Go to ascend-deployer directory generated after the decompression and run start_download_ui.bat. On the displayed page, select the OS and the software package to be downloaded, and click Download.
For example, select Ubuntu_18.04_x86_64 in the OS_LIST column, and select MindSpore_x.x.x and MindStudio_x.x.x in the PKG_LIST column.
Downloading the driver, firmware, and CANN software packages online by selecting CANN_x.x.x in the PKG_LIST column must meet many constraints (for details, see Downloading Packages). Therefore, you are advised to download the software packages to be installed by referring to Table 1 and save them to the ascend-deployer/resources directory.
When you select the software package version to be downloaded, pay attention to the version mapping between CANN, MindSpore, and MindStudio. See the following table.
Table 2 Version mapping Software
Matching Version 1
Matching Version 2
Matching Version 3
Matching Version 4
CANN
20.3.0
5.0.1.spc103
5.0.2.1
5.0.3.1
MindSpore
1.1.1
1.2.1
1.3.0
1.5.0
MindStudio
2.0.0
3.0.1
3.0.2
3.0.3
- If you select CANN_x.x.x in the PKG_LIST column, the system will automatically download the npu, toolkit, nnrt, nnae, tfplugin, and toolbox software packages.
- Select MindSpore_x.x.x in the PKG_LIST column. The MindSpore software package of the selected version is automatically downloaded.
- Select MindStudio_x.x.x in the PKG_LIST column. The MindStudio software package of the selected version is automatically downloaded. Currently, the ascend-deployer tool is used to download and install MindStudio. Only Ubuntu_18.04_x86_64, Ubuntu_18.04_aarch64, and EulerOS_2.8_aarch64 are supported.
- The ascend-deployer tool cannot automatically download the PyTorch or TensorFlow (AArch64 architecture) installation package. If you want to install PyTorch (torch-1.5.0+*.whl and apex-0.1+*.whl) or TensorFlow for the AArch64 architecture (tensorflow-1.15.0-*.whl), place the compiled .whl package in the ascend-deployer/resources/pylibs directory.
- 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.
- Create the HwHiAiUser user for running 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.
- Go to the ascend-deployer directory (for example, ~/ascend-deployer) and run the installation script. (The installation user must have the execute permission on the install.sh script.)
./install.sh --install-scene=auto // Automatic installation of all software packages that can be found
ascend-deployer provides several basic installation scenarios. For details, see Optional Installation Scenarios.
- Perform post-installation configurations. For details, see Post-installation Configuration.