Performing Post-installation Configuration

After the software package installation, perform required configurations based on service requirements.

Installing Dependencies Required for Running Services

When running services, the system depends on g++ and the following third-party Python libraries. Run the following commands to install them:

  1. Install g++. (If you install it as the root user, delete sudo from the command.)
    Debian/Ubuntu/veLinux:
    1
    sudo apt-get install -y g++
    
    openEuler, CentOS, Kylin, BCLinux, UOS V20, AntOS, AliOS, CTyunOS, CULinux, Tlinux, MTOS, vesselOS:
    1
    sudo yum install -y gcc-c++
    
  2. Install a third-party Python library. (If you install it as the root user, delete --user from the command.)
    1
    pip3 install attrs cython 'numpy>=1.19.2,<2.0' decorator sympy cffi pyyaml pathlib2 psutil protobuf==3.20.0 scipy requests absl-py --user
    

    Executing the preceding command will install the dependency of the latest version or a specified version. Third-party Python libraries, such as NumPy, must be used matching the Python version. If an error is reported, see Running Dependencies to check the version requirements.

    If the pip source is unavailable during the installation, configure the pip source by referring to Configuring the pip Source. Then, run the installation command.

Verification After Installation

Run the following command. If the chip model is returned, the CANN installation is successful.

1
python3 -c "import acl;print(acl.get_soc_name())"

(Optional) Configuring the Maximum Number of Threads

In training scenarios, the maximum number of threads of OS may not meet the training requirements. In this case, perform the following operations as the root user to cancel the limitation on this number.

  1. Configure environment variables, change the number of threads to unlimited, and open the /etc/profile file.
    1
    vi /etc/profile
    
  2. Add the following content to the file, and save the change and exit:
    1
    ulimit -u unlimited
    
  3. Apply the environment variables.
    1
    source /etc/profile