Installing the NPU Driver (Online Installation Using apt-get)
Preparing Users
The following describes how to create installation and running users. If the users already exist, skip this section.
For Atlas 200I/500 A2 inference products, install the NPU driver by referring to Installing the NPU Driver and Firmware.
|
Component |
Installation User |
Running User |
|---|---|---|
|
NPU driver |
root |
|
The users used in the example steps in this section are as follows:
- Driver installation user: root
- Running user: Non-root user HwHiAiUser (default running user for the driver)
1 2 |
groupadd HwHiAiUser useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash |
For details about the functions and configuration requirements of the default user HwHiAiUser, see the Atlas Hardware Product Account List. If you want to create other non-root users, create them on your own.
Installing Dependencies and Configuring the Ascend Repository
- Check whether the source is available.
1apt-get updateIf the system reports an error or the waiting time becomes excessive, check whether the network is connected or modify the /etc/apt/sources.list file to configure an available repository. (For example, to configure the Huawei mirrored repository, you can see the configuration method of the mirrored repository in the Huawei Mirrors).
- Run the following command to install dependencies.
1apt-get install -y make dkms gcc linux-headers-$(uname -r)
- Configure the Ascend repository. Otherwise, the installation will fail.
wget https://ascend.devcloud.huaweicloud.com/cann/debian/cann-keyring_1.0.0_all.deb sudo dpkg -i cann-keyring_1.0.0_all.deb sudo apt-get update
Installing the NPU Driver
|
Product Type |
Installation Command |
||
|---|---|---|---|
|
Ascend 950PR&950DT products |
|
||
|
Atlas A3 products |
|
||
|
Atlas A2 products |
|
||
|
Atlas training products |
|
||
|
Atlas inference products |
|
1
|
npu-smi info
|
If the driver information is displayed, the driver is successfully loaded. Otherwise, the loading fails. Visit the Support website to seek help in the forum or submit a technical service ticket.
