Preparing Installation and Running Users

Running User

Running user: user who runs the inference service or performs training.

Before installing the driver as the root user, you need to prepare a running user in the target environment. The default running user is HwHiAiUser. The running user can be automatically or manually created.

  • Automatic creation: If both UID and GID are 1000 and are not occupied, ascend-deployer automatically creates the HwHiAiUser user when you run the installation command.
  • Manual creation: The following describes how to create the HwHiAiUser user:

    To specify another user as the running user, modify the inventory_file configuration file during the installation.

    1. Create the running user HwHiAiUser.
      groupadd HwHiAiUser
      useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash
    2. Set the password of the HwHiAiUser user.
      passwd HwHiAiUser

    The password must meet the password complexity requirements. For details, see Password Complexity Requirements. The password validity period is 90 days. You can change the validity period in the /etc/login.defs file or using the chage command. For details, see Setting User Account Validity Period.

Installation User

Installation user: user who installs the software package.
  • The root user can install all the software downloaded using ascend-deployer tool.
  • A non-root user can install only the software listed in Table 1 and only specified software can be installed. For details, see Running the Installation Command.
    • System components cannot be installed by a non-root user. Before installing the software listed in Table 1 as a non-root user, install sys_pkg (system component) and NPU (driver and firmware, for Ascend devices) as the root user.
    • If you want to install the CANN software (such as Toolkit) as a non-root user, run the following command as the root user to add the installation user to the HwHiAiUser group (the default user group is HwHiAiUser, which is subject to the actual situation).
      usermod -a -G HwHiAiUser username

      In the preceding command, username indicates the name of a non-root user. Replace it with the actual username.

  • If you need to install the edge components (AtlasEdge and HA) of version 2.0.2, pay attention to the following:
    When installing the driver and firmware packages, ensure that the HwHiAiUser user can log in to the system. When installing edge components (AtlasEdge and HA), ensure that the HwHiAiUser user cannot log in to the system. Set this parameter based on the actual requirements.
    usermod -s /bin/bash HwHiAiUser       # When installing the driver and firmware package
    usermod -s /sbin/nologin HwHiAiUser   # When installing the edge components (AtlasEdge and HA) of version 2.0.2
  • When the edge component (AtlasEdge) of version 2.0.3 or later is installed, a MindXEdge user is created by default.
  • Before installing the edge components of version 2.0.4, install the haveged service (for example, run the apt install haveged command in the Ubuntu system). After the installation, run the systemctl enable haveged and systemctl start haveged commands to start the haveged service.