Installing CANN (Online Installation Using Conda)
This section describes how to quickly install the CANN software using Conda. Click here to check the supported CANN software packages and versions.
Prerequisites
The installation directory of the Conda virtual environment (and all its upper-level directories) must have the 755 permission.
Configuring the Ascend Repository
1 | conda config --add channels https://repo.huaweicloud.com/ascend/repos/conda/ |
Installing the Toolkit Development Kit
The CANN Toolkit development kit is installed in the training, inference, and development and debugging scenarios. It is used for training and inference services, model conversion, and operator/application/model development and compilation.
- Ensure that the available space of the installation directory is greater than 10 GB. If this requirement is not met, clear the space or change the installation directory.
- Both Toolkit and ops need to be installed.
- Run the installation command.
1conda install ascend::cann-toolkit==8.5.0
By default, the software package of the latest version is installed. Click here to check and install a software package of another version by running the corresponding command.
The default installation path of the software package is the Ascend directory in the Conda virtual environment, for example, /home/miniconda3/Ascend.
- Configure environment variables. The following uses /home/miniconda3/Ascend as an example. Replace it with the actual path.
1source /home/miniconda3/Ascend/cann/set_env.sh
The preceding environment variables take effect only in the current window. You can add the preceding commands to the environment variable configuration file (for example, the .bashrc file) as required.
Installing the ops Operator Package
The CANN operator package optimizes high-performance computing by integrating a comprehensive suite of libraries, including the basic operator framework, specialized libraries for Math, NN, CV, and Transformer, as well as the TBE operator, HCCL set communication library, HIXL unilateral communication library, and DVPP library. This package provides both dynamic and static library files for single-operator API execution (such as aclnn), alongside the source operator source code and kernel binary files. By bundling these diverse assets, CANN significantly enhances overall running capability and execution efficiency in intensive computing scenarios.
Before installing the ops operator package, install Toolkit of the matching version in the same path. Currently, the ops operator packages of multiple chips cannot be installed in the same path. You can install Toolkit and ops of different chips in different paths to meet the development and deployment requirements in a multi-chip environment.
Product Type |
Installation Command |
||
|---|---|---|---|
Atlas A3 series |
|
||
Atlas A2 series |
|
||
Atlas training series |
|
||
Atlas inference series |
|
||
Atlas 200I/500 A2 inference series |
|
By default, the software package of the specified version is installed. To install another version, add the version number to the end of the software package and click here to check the corresponding command.
(Optional) Installing the NNAL Neural Network Acceleration Library
The NNAL neural network acceleration library provides the Ascend Transformer Boost (ATB) and AscendSiPBoost (SiP) signal processing acceleration libraries.
Before installing an acceleration library, install Toolkit of the matching version and configure environment variables.
- Run the installation command.
1conda install ascend::cann-nnal==8.5.0
By default, the software package of the latest version is installed. Click here to check and install a software package of another version by running the corresponding command.
The default installation path of the software package is the Ascend directory in the Conda virtual environment, for example, /home/miniconda3/Ascend.
- Configure environment variables. The following uses /home/miniconda3/Ascend as an example. Replace it with the actual path.
Note that the environment variable scripts of the ATB and SiP acceleration libraries cannot be configured at the same time.
The preceding environment variables take effect only in the current window. You can add the preceding commands to the environment variable configuration file (for example, the .bashrc file) as required.