Post-installation Configurations

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

Installing Runtime Dependencies

To run services, g++ and the following third-party Python libraries are required.

  1. Install g++. (If you install it as the root user, delete sudo from the command.)
    Debian, Ubuntu, and veLinux:
    1
    sudo apt-get install -y g++
    
    openEuler, CentOS, Kylin, BC-Linux, 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 decorator sympy cffi pyyaml pathlib2 psutil protobuf==3.20.0 scipy requests absl-py --user
    

    The preceding command installs the dependency of the latest version or a specified version. The third-party Python libraries (such as NumPy and SciPy) must match the Python version. For details about the version requirements, see Runtime Dependencies.

    If the system displays a message indicating that the pip source is unavailable during the installation, configure the pip source by referring to Configuring the pip source. Then, run the installation command.

Post-installation Verification

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, run the following commands 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. Make the environment variable configuration take effect.
    1
    source /etc/profile