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.
- 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 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.
- 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
If you specify --download to CANN to download drivers, firmware packages, and CANN software packages that are earlier than 6.0.RC1 online, many restrictions must be met (for details, see Requirements for Online Download). Therefore, you are advised to download the software packages to be installed by referring to Table 1 and place them in the ascend-deployer/resources directory. For details about the version mapping, see Ascend Data Center Solution Version Mapping.
- --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 system automatically downloads the latest available MindSpore software package.
- If --download is set to MindStudio, the system automatically downloads the latest available MindStudio software package. 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, torch-1.8.1+*.whl, torch_npu-1.8.1*.whl, and apex-0.1+*.whl) or TensorFlow for the AArch64 architecture (tensorflow-1.15.0-*.whl and tensorflow-2.6.5-*.whl), place the compiled *.whl package in the ascend-deployer/resources/pylibs directory. Strictly comply with the official compilation specifications when compiling TensorFlow for the AArch64 architecture.
- TensorFlow 2.6.5 has vulnerabilities. For details about how to handle the vulnerabilities, see the Vulnerabilities and Fixing Solutions.
- 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.
To download drivers, firmware packages, and CANN software packages online by selecting CANN_x.x.x in the PKG_LIST column, many constraints must be met. For details, see Downloading Packages. Therefore, you are advised to download the software packages to be installed by referring to Table 1 and place them in the ascend-deployer/resources directory. For details about the version mapping, see Ascend Data Center Solution Version Mapping.
- 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, torch-1.8.1+*.whl, torch_npu-1.8.1*.whl, and apex-0.1+*.whl) or TensorFlow for the AArch64 architecture (tensorflow-1.15.0-*.whl and tensorflow-2.6.5-*.whl), place the compiled *.whl package in the ascend-deployer/resources/pylibs directory. Strictly comply with the official compilation specifications when compiling TensorFlow for the AArch64 architecture.
- 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.