Environment Preparation
Environment Requirements
The DDK installation must meet the following environment requirements on the hardware and operating system (OS).
Category |
Version |
Obtaining Method |
Precautions |
---|---|---|---|
OS |
EulerOS-V2.0SP8 |
Contact Huawei technical support to obtain the following recommended version: EulerOS-V2.0SP8-aarch64-dvd.iso |
You are advised to use EulerOS whose kernel version is 4.19.36-vhulk1907.1.0.h410.eulerosv2r8.aarch64. |
Python |
Python 2: 2.7+ Python 3: 3.5+ |
For details, see Installing Dependency. |
- |
(Optional) Preparing the DDK Installation User
You can install the DDK as any user (root or non-root).
- If the root user is used for installation, skip this section.
- If an existing non-root user is used for installation, ensure that the user has the read, write, and execute permissions on the $HOME directory.
- If you want to install the DDK as a new non-root user, perform the following steps as the root user: This document describes how to install the DDK as a new non-root user.
- Run the following commands to create a DDK installation user and set the $HOME directory of the user. Ensure that the user has the read, write, and execute permissions on the $HOME directory.
useradd -d /home/username -m username
- Run the following command to set the password:
passwd username
username indicates the user name for installing the DDK. The umask value of the user cannot be greater than 0027.- To view the umask value, run the umask command.
- You can change the umask value by running the umask NewValue command.
If the created non-root user is HwHiAiUser, the DDK is deployed on the host server, and HwHiAiUser is used for offline model conversion, logs are stored in the var/dlog directory on the host by default. To enable the output of logs to the screen by default, you can set the following environment variable:export SLOG_PRINT_TO_STDOUT=1
- Run the following commands to create a DDK installation user and set the $HOME directory of the user. Ensure that the user has the read, write, and execute permissions on the $HOME directory.
- Change the size of the file descriptor.
- Open the system configuration file /etc/security/limits.conf as the root user by running the following command:
vi /etc/security/limits.conf
- Add the following content to the end of the limits.conf file:
* soft nproc 65535 * hard nproc 65535 * soft nofile 65535 * hard nofile 65535
The asterisk (*) indicates all users. You are advised to replace it with the DDK installation user name.
- Run the :wq! command to save the file and exit.
- Open the system configuration file /etc/security/limits.conf as the root user by running the following command:
(Optional) Configuring Permissions of the DDK Installation User
When a non-root user is used for installation, perform the following operations. Skip the following operations if the root user is used for installation.
Before installing the DDK, you need to download the dependencies, which requires permissions such as sudo yum. Perform the following operations as the root user:
- Run the following commands to open the /etc/sudoers file:
chmod u+w /etc/sudoers vi /etc/sudoers
- Under root ALL=(ALL:ALL) ALL in the file, add the following content:
username ALL=(ALL:ALL) NOPASSWD:SETENV: /usr/bin/yum
Replace username with the name of the common user who executes the installation script.
- Run :wq! to save the file.
- Run the following command to revoke the write permission on the /etc/sudoers file:
chmod u-w /etc/sudoers

Ensure that the last line of the /etc/sudoers file is #includedir /etc/sudoers.d. Otherwise, add it manually.
Configuring the Local Source
The EulerOS image has minor version differences. To avoid compatibility differences, you are advised to use the local image source for installation.
Perform the following steps as the root user:
- Upload EulerOS-V2.0SP8-aarch64-dvd.iso to the server and run the following command to mount the image:
Command: mount -o loop Euler image.iso Image mount directory
Example: mount -o loop EulerOS-V2.0SP8-aarch64-dvd.iso /mnt
- Go to the /etc/yum.repos.d directory and back up the repo file.
Command: cp Source management file.repo Source management file.repo.bak
Example: cp euleros_aarch64.repo euleros_aarch64.repo.bak
- Replace the source management file.
Command: vim Source management file .repo
Example: vim euleros_aarch64.repo
[base] name=EulerOS-2.0SP8 base baseurl=file:///mnt enabled=1 gpgcheck=0
If the image mount directory is not /mnt, replace the value of baseurl.
- Run the following commands to update the software information:
yum clean all yum makecache
Installing Dependency
Run the su - username command to switch to the DDK installation user and perform the following operations to install components such as Python on which the DDK depends:
- Check whether Python 2 and Python 3 are installed.
The DDK installation depends on Python 2 and Python 3. Run the python -V and python3 -V commands to check whether Python 2 and Python 3 are installed.
If the following information is displayed, the software has been installed: Otherwise, go to 2 to install Python 2 and Python 3.
python 2.7.15 python 3.7.0
- Install Python 2 and Python 3.
- Check whether Python 2 and Python 3 are available in the source list.
sudo yum list "*python2*"
sudo yum list "*python3*"
- If the source list contains the python2.aarch64 and python3.aarch64 images (the image names may vary depending on the image sources), run the following command to install Python 2 and Python 3:
Command: sudo yum install Image name
Example: sudo yum install python3.aarch64
- Check whether Python 2 and Python 3 are available in the source list.
- Install the dependencies of Python 2 and Python 3.
- Run the following commands to search for installed NumPy and decorator libraries:
rpm -qa | grep numpy
rpm -qa | grep decorator
If the following information is displayed, the NumPy and decorator libraries for Python 2 and Python 3 have been installed: If the NumPy and Decorator libraries are not installed, perform 3.b to 3.c to install the required NumPy and decorator libraries.
python3-decorator-4.3.0-1.eulerosv2r8.noarch python3-numpy-1.15.1-1.eulerosv2r8.aarch64 python2-decorator-4.3.0-1.eulerosv2r8.noarch python2-numpy-1.15.1-1.eulerosv2r8.aarch64
- Search for available NumPy and decorator libraries.
sudo yum list "*numpy*"
sudo yum list "*decorator*"
If the following information is displayed, the NumPy and decorator libraries are available:
python2-numpy.aarch64 python2-decorator.noarch python3-numpy.aarch64 python3-decorator.noarch
If the NumPy library for Python 3 cannot be found, contact Huawei technical support to obtain the EulerOS image package whose kernel version is 4.19.36-vhulk1907.1.0.h529.eulerosv2r8.aarch64 or later. Perform operations in Configuring the Local Source again.
- Run the following commands to install the required NumPy and decorator libraries for Python 2 and Python 3:
Command: sudo yum install NumPy dependency library
Example: sudo yum install python3-numpy.aarch64
Command: sudo yum install decorator dependency library
Example: sudo yum install python3-decorator.noarch
- Run the following commands to search for installed NumPy and decorator libraries:
(Optional) Restoring the Source Configuration
If you do not need to use the local source, perform the following steps to restore the source management file:
- Go to the /etc/yum.repos.d directory and restore the repo file.
cp -f euleros_aarch64.repo.bak euleros_aarch64.repo
- Unmount the image file.
Command: umount Mount directory
Example: umount /mnt
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot