Huawei A500-3000, A500-3010 Installation Manual

Huawei A500-3000, A500-3010 Installation Manual

Atlas Intelligent Edge

V100R020C00

CANN Software Installation Guide

(A500-3000, A500-3010)

Issue

01

Date

2021-03-02

HUAWEI TECHNOLOGIES CO., LTD.

Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved.

No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.

All other trademarks and trade names mentioned in this document are the property of their respective holders.

Notice

The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise c fi in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied.

The information in this document is subject to change without notice. Every ff r has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied.

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

i

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

Contents

Contents

1 Installation Scenarios.............................................................................................................

 

1

2 Installing the Development Environment.........................................................................

2

2.1

Obtaining Software Packages.............................................................................................................................................

2

2.2

Preparations for Installation................................................................................................................................................

 

3

2.2.1

nfig

r ng Ubuntu x86 ....................................................................................................................................................

 

3

2.3

Procedure...................................................................................................................................................................................

 

 

9

2.4

 

nfig r ng the Compilation Environment..................................................................................................................

11

2.5

Developing Applications.....................................................................................................................................................

 

12

2.6

Verifying Applications..........................................................................................................................................................

 

12

2.6.1

r fic

n Description ...................................................................................................................................................

 

12

2.6.2 Creating an Inference Container Image....................................................................................................................

12

2.6.3 Starting and Verifying a Container Image................................................................................................................

16

3 Installing the Operating Environment.............................................................................

19

3.1

Data Planning........................................................................................................................................................................

 

 

19

3.1.1 AI Edge Station Network Ports.....................................................................................................................................

19

3.1.2 Typical Networking...........................................................................................................................................................

 

20

3.1.3 Drive Partition Planning..................................................................................................................................................

 

22

3.2

Obtaining Software Packages...........................................................................................................................................

22

3.3

Default Information.............................................................................................................................................................

 

 

22

3.4

Scenarios

 

 

23

3.5

Scenario 1: Batch

nfig r

n Using SmartKit (Recommended).....................................................................

24

3.5.1 Installing and Running SmartKit..................................................................................................................................

24

3.5.2 Batch

n Using a Template......................................................................................................................

26

3.6

Scenario 2: Single-Device

nfig r n.......................................................................................................................

31

3.6.1 Initial .........................................................................................................................................................

n

 

31

3.6.2 Managing ...................................................................................Atlas 500 AI Edge Stations on FusionDirector

31

3.7

Deploying .......................................................................................................................................................Applications

 

38

4 Common ............................................................................................................Operations

 

39

4.1

 

nfig r ng ............................................................................................................................a System Network Proxy

39

4.2

Uninstalling .....................................................................................................................................the CANN Software

40

4.3

Setting User .............................................................................................................................Account Validity Period

41

5 FAQs..........................................................................................................................................

 

 

43

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

ii

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

Contents

5.1

What Do I Do If "Could not fin a version that

fi the requirement xxx" Is Displayed When

pip3.7.5 install Is Run?................................................................................................................................................................

43

6 References...............................................................................................................................

45

6.1

Parameters..............................................................................................................................................................................

45

6.2

About CCEC Compiler..........................................................................................................................................................

47

6.3

HCC Overview........................................................................................................................................................................

48

A Change History......................................................................................................................

50

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

iii

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

1 Installation Scenarios

1Installation Scenarios

Installing the Development Environment

The development environment refers to an environment used by a user to develop an application program. It is usually deployed a PC or a server.

The development kit must be installed in the development environment. In the scenario where the operating environment is deployed on an ARM device and the development environment is deployed on an x86-architecture device, you need to install the development kits of both the x86 and ARM architectures and the cross compilation tool in the development environment.

Installing the Operating Environment

The operating environment is the environment for running applications developed by users. The operating environment requires the c nfig r n of Ascend AI devices. See Atlas 500 AI edge station.

Create a container image using the ffl n inference engine and applications, and run the container image on an Ascend AI device.

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

1

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

2Installing the Development Environment

2.1Obtaining Software Packages

2.2Preparations for Installation

2.3Procedure

2.4nfig r ng the Compilation Environment

2.5Developing Applications

2.6Verifying Applications

2.1Obtaining Software Packages

Downloading Software Packages

Before installing the software, obtain software packages. The versions of the software packages must be consistent.

Table 2-1 Software packages

Name

Package

OS

Description

How to

 

 

Architecture

 

Obtain

 

 

 

 

 

Develop

Ascend-cann-

Ubuntu X86

It is used for

Link

ment kit

toolkit_{version}_li

 

application

 

 

nux-

 

development,

 

 

x86_64_gcc7.3.0.ru

 

custom operator,

 

 

n

 

and model

 

 

 

 

conversion. The

 

 

 

 

development kit

 

 

 

 

contains the

 

 

 

 

library fi

 

 

 

 

required for

 

 

 

 

developing

 

 

 

 

applications and

 

 

 

 

development

 

 

 

 

 

 

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

2

Atlas Intelligent Edge

 

 

 

 

CANN Software Installation Guide (A500-3000,

 

 

 

A500-3010)

 

2 Installing the Development Environment

 

 

 

 

 

 

 

Name

Package

OS

Description

How to

 

 

 

Architecture

 

Obtain

 

 

Ascend-cann-

Ubuntu Arm

auxiliary tools

 

 

 

toolkit_{version}_li

 

such as the ATC

 

 

 

nux-

 

model conversion

 

 

 

aarch64_gcc7.3.0.r

 

tool.

 

 

 

un

 

 

 

 

 

 

 

 

 

 

ffl n

Ascend-cann-

Ubuntu ARM

It contains the

 

 

inference

nnrt_{version}_linu

container

ACL library ACLlib,

 

 

engine

x-

basic image

which is used for

 

 

package

aarch64_gcc7.3.0.r

 

model inference

 

 

 

un

 

of applications.

 

 

 

 

 

The package is

 

 

 

 

 

used for 2.6.2

 

 

 

 

 

Creating an

 

 

 

 

 

Inference

 

 

 

 

 

Container Image.

 

 

 

 

 

 

 

NOTE

{version} indicates the software version.

2.2 Preparations for Installation

2.2.1

Ubuntu x86

Environment Requirements

Prepare an x86 server (or PC) for setting up the development environment. You need to install the Ubuntu x86 on the server in advance.

The hardware and OS of the development environment must meet the requirements listed in Table 2-2.

Table 2-2 Ubuntu x86 version information

Parameter

Version

How to Obtain

 

Restriction

 

 

 

 

OS

18.04

ffic website

 

 

 

Python

3.7.5

See Installing Dependencies.

 

 

 

cmake

3.5.1+

 

 

 

 

protobuf

3.11.3+

 

 

 

 

g++

7.3.0 or later

 

 

 

 

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

3

Atlas Intelligent Edge

 

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

 

2 Installing the Development Environment

 

 

 

 

 

Parameter

Version

How to Obtain

 

 

Restriction

 

 

gcc

7.3.0 or later

 

 

 

 

 

Checking the umask of the root User

1.Log in to the installation environment as the root user.

2.Check the umask value of the root user.

umask

3. If the umask value is not 0022, append "umask 0022" to the fi and save the fi

a.Run the following command in any directory to open the .bashrc fi

vi ~/.bashrc

 

Append umask 0022 to the end of the fi

b.

Run the :wq! command to save the fi and exit.

c.

Run the source ~/.bashrc command for the m fic n to take ff c

 

immediately.

Creating Installation and Running Users

Table 2-3 lists the users for installing and running the firmw r and CANN software.

Table 2-3

Installation and running user list

 

 

 

Package

Installation User

Running User

Type

 

 

 

CANN

 

The user can be root or

The user must be a non-root user.

software

 

non-root. For details, see

 

packages

the content below the

 

 

 

table.

 

 

 

 

 

For installation as the root user:

After installation as the root user, you must switch to a non-root user for execution (the running user must not belong to the root user group). Therefore, you need to create a running user before the installation.

If the created user is HwHiAiUser, you can directly install the software packages as the HwHiAiUser user. The default installation user is

HwHiAiUser.

If the created user is not HwHiAiUser, you need to specify the running user (by using the --install-username=user name --install- usergroup=user group parameter) when installing the software package. Perform the following operations to create a user.

For installation as a non-root user:

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

4

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

In this scenario, the installation and running users must be the same.

If a non-root user exists, you do not need to create one.

If you want to use a new non-root user, you need to create the user fir

To create a non-root user, run the following commands as the root user:

1.Create a non-root user.

groupadd usergroup

useradd -g usergroup -d /home/username -m username

2.Set the password of the non-root user.

passwd username

NOTE

The created running user cannot belong to the root user group.

After the HwHiAiUser user is created, do not disable the login authentication function of the user.

The password validity period is 90 days. You can change the validity period in the /etc/

login.defs fi or using the chage command. For details, see 4.3 Setting User Account Validity Period.

Permissions for the User

Before installing the development kit, you need to download the dependencies, which require sudo apt-get permission. Run the following commands as the root user:

1.Open the /etc/sudoers fi

chmod u+w /etc/sudoers vi /etc/sudoers

2. Add the following content under # User privilege of the fi

root ALL=(ALL:ALL) ALL

username ALL=(ALL:ALL) NOPASSWD:SETENV:/usr/bin/apt-get, /usr/bin/pip, /bin/tar, /bin/

mkdir, /bin/rm, /bin/sh, /bin/cp, /bin/bash, /usr/bin/make install, /bin/ln -s /usr/local/python3.7.5/bin/ python3 /usr/bin/python3.7, /bin/ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/pip3.7, /bin/ln -s /usr/ local/python3.7.5/bin/python3 /usr/bin/python3.7.5, /bin/ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/

pip3.7.5, /usr/bin/unzip,

b n

b n

b n c

m

r b n

 

r b n

 

r b n

v

b n mv b n c

b n c wn r b n

 

r b n

r b n y m r b n y

r r b n

r

r b n gr

b n c

r b n

rm

r b n

w

r b n

c

r b n

r

r b n

b n

b n f

r b n gr

b n gr

 

r b n rv c b n

b n gr

b n

c nfig r b n

b n r

n

r b n

q 3

r b n

 

/usr/bin/perf, /usr/bin/

ltrace,

r b n fin

 

 

 

 

 

 

 

 

 

Replace username with the actual installation userfor installation as a nonroot user. Replace username with the actual running user (HwHiAiUser by default) for installation as the root user.

NOTE

Ensure that the /etc/sudoers fi contains #includedir /etc/sudoers.d. If the fi does not contain #includedir /etc/sudoers.d, manually add it to the end of the fi

3.Run the :wq! command to save the fi

4.Run the following command to revoke the write permission on the /etc/

sudoers fi

chmod u-w /etc/sudoers

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

5

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

Checking the Source Validity

Development kit installation requires the download of related dependencies. Ensure that the installation environment can be connected to the network.

Run the following command as the root user to check whether the source is valid:

apt-get update

If an error is reported during command execution or dependency installation, check whether the network connection is normal, or replace the source in

the /etc/apt/sources.list fi

with an available source or use an image source. For

details about how to c nfig

r a network proxy, see 4.1

a System

Network Proxy.

 

 

Installing Dependencies

NOTE

If you install Python and its dependencies as the root user, perform 1 to 3. Note that the sudo keywords in the commands need to be deleted if any.

If you install Python and its dependencies as a non-root user, run the su - username command to switch to the non-root user and perform Step 1 to Step 3.

Step 1 Check whether the Python dependencies and GCC software are installed.

Run the following commands to check whether the dependencies such as GCC, Make, and Python are installed:

gcc --version g++ --version make --version cmake --version

dpkg -l zlib1g| grep zlib1g| grep ii

dpkg -l zlib1g-dev| grep zlib1g-dev| grep ii dpkg -l libsqlite3-dev| grep libsqlite3-dev| grep ii dpkg -l openssl| grep openssl| grep ii

dpkg -l libssl-dev| grep libssl-dev| grep ii dpkg -l bffi v grep bffi v grep ii dpkg -l unzip| grep unzip| grep ii

dpkg -l pciutils| grep pciutils| grep ii dpkg -l net-tools| grep net-tools| grep ii

If the following information is displayed, the installation is complete. Go to the next step.

gcc (Ubuntu 7.3.0-3ubuntu1~18.04) 7.3.0

 

 

g++ (Ubuntu 7.3.0-3ubuntu1~18.04) 7.3.0

 

 

GNU Make 4.1

 

 

 

 

cmake version 3.10.2

 

 

 

 

zlib1g:amd64

1:1.2.11.dfsg-0ubuntu2 amd64

compression library - runtime

zlib1g-dev:amd64 1:1.2.11.dfsg-0ubuntu2 amd64

compression library - development

libsqlite3-dev:amd64 3.22.0-1ubuntu0.3 amd64

SQLite 3 development fi

openssl

1.1.1-1ubuntu2.1~18.04.5 amd64

Secure Sockets Layer toolkit - cryptographic utility

libssl-dev:amd64 1.1.1-1ubuntu2.1~18.04.5 amd64

Secure Sockets Layer toolkit - development fi

bffi v

m

64 3.2.1-8

amd64

Foreign Function Interface library (development fi

unzip

6.0-21ubuntu1 amd64

De-archiver for .zip fi

 

pciutils

1:3.5.2-1ubuntu1.1 amd64

Linux PCI Utilities

 

net-tools

1.60+git20161116.90da8a0-1ubuntu1 amd64

NET-3 networking toolkit

Otherwise, run the following command to install the software. You can change the following command to install only some of them as required.

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

6

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

CAUTION

If you install dependencies as the root user, delete sudo from the commands in steps 1 and 2.

If Python and its dependency are installed as a non-root user, run the su - username command to switch to the non-root user, and then perform step 1 to step 3.

libsqlite3-dev must be installed before the Python installation. If the Python 3.7.5 environment has been installed in the user's OS and libsqlite3-dev is installed after the Python 3.7.5 environment is installed, you need to rebuild the Python environment.

sudo apt-get install -y gcc g++ make cmake zlib1g zlib1g-dev libsqlite3-dev openssl libssl-dev bffi v unzip pciutils net-tools

Step 2 Check whether the Python development environment is installed.

The development kit depends on the Python environment. Run the python3.7.5 -- version and pip3.7.5 --version commands to check whether Python has been installed. If the following information is displayed, Python has been installed. Go to the next step.

Python 3.7.5

pip 19.2.3 from /usr/local/python3.7.5/lib/python3.7/site-packages/pip (python 3.7)

Otherwise, use the following procedure to install Python 3.7.5:

1.Run the wget command to download the source code package of Python 3.7.5 to any directory of the installation environment. The command is as

follows:

wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz

2.Run the following command to go to the download directory and decompress

the source code package:

tar -zxvf Python-3.7.5.tgz

3. Go to the decompressed folder and run the following c nfig r

n build, and

installation commands:

 

 

 

 

 

cd Python-3.7.5

 

 

 

 

 

 

c nfig r

r fix

r c y

n3 7 5 --enable-loadable-sqlite-extensions --enable-shared

 

make

 

 

 

 

 

 

 

sudo make install

 

 

 

 

 

 

The

x parameter

c fi

the Python installation path. You can change

 

it based on the site requirements. The --enable-shared parameter is used to

compile the libpython3.7m.so.1.0 dynamic library. The --enable-loadable-

 

sqlite-extensions parameter is used to load libsqlite3-dev.

 

 

This document uses

x

y

as an example. After the

 

c nfig r

n

compilation, and installation commands are executed, the

installation package is output to the /usr/local/python3.7.5 directory, and the libpython3.7m.so.1.0 dynamic library is output to the /usr/local/ python3.7.5/lib/libpython3.7m.so.1.0 directory.

4.Check whether libpython3.7m.so.1.0 exists in /usr/lib64 or /usr/lib. If yes,

skip this step or back up the libpython3.7m.so.1.0 fi provided by the system and run the following command:

Copy the compiled fi libpython3.7m.so.1.0 to /usr/lib64:

sudo cp /usr/local/python3.7.5/lib/libpython3.7m.so.1.0 /usr/lib64

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

7

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

When the following information is displayed, enter y to overwrite the libpython3.7m.so.1.0 fi provided by the system.

cp: overwrite 'libpython3.7m.so.1.0'?y

If the /usr/lib64 directory does not exist in the environment, copy the fi to the /usr/lib directory.

sudo cp /usr/local/python3.7.5/lib/libpython3.7m.so.1.0 /usr/lib

Replace the path of the libpython3.7m.so.1.0 fi as required.

5.Run the following commands to set the soft link:

sudo ln -s /usr/local/python3.7.5/bin/python3 /usr/bin/python3.7 sudo ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/pip3.7

sudo ln -s /usr/local/python3.7.5/bin/python3 /usr/bin/python3.7.5 sudo ln -s /usr/local/python3.7.5/bin/pip3 /usr/bin/pip3.7.5

If a message indicating that the link already exists is displayed during the command execution, run the following commands to delete the existing link and run the commands again:

sudo rm -rf /usr/bin/python3.7.5 sudo rm -rf /usr/bin/pip3.7.5 sudo rm -rf /usr/bin/python3.7 sudo rm -rf /usr/bin/pip3.7

6.Run the following commands to set the soft link:

sudo ln -s /usr/local/python3.7.5/bin/python3 /usr/local/python3.7.5/bin/python3.7.5 sudo ln -s /usr/local/python3.7.5/bin/pip3 /usr/local/python3.7.5/bin/pip3.7.5

7.Set the Python 3.7.5 environment variables.

a.Run the vi ~/.bashrc command in any directory as the running user to

open the .bashrc fi and append the following content to the fi

# Set the Python 3.7.5 library path.

export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH

# If multiple Python 3 versions exist in the user environment, specify Python 3.7.5. export PATH=/usr/local/python3.7.5/bin:$PATH

b.

Run the :wq! command to save the fi and exit.

c.

Run the source ~/.bashrc command for the m fic n to take ff c

 

immediately.

8.After the installation is complete, run the following commands to check the installation version. If the required version information is displayed, the

installation is successful.

python3.7.5 --version pip3.7.5 --version

Step 3 Install the Python 3 development environment.

Before the installation, run the pip3.7.5 list command to check whether the dependencies have been installed. If yes, skip this step. If not, run the following command to install the dependencies: (If only some of the software is not installed, modify the following command to install selected software only.)

If you install Python and its dependencies as a non-root user, add --user at the end of each command in this step to ensure that the installation is successful. Example command: pip3.7.5 install attrs --user

pip3.7.5 install attrs pip3.7.5 install psutil pip3.7.5 install decorator pip3.7.5 install numpy

pip3.7.5 install protobuf==3.11.3 pip3.7.5 install scipy

pip3.7.5 install sympy pip3.7.5 install cffi

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

8

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

pip3.7.5 install grpcio==1.32.0 pip3.7.5 install grpcio-tools==1.32.0 pip3.7.5 install requests

During the command execution, if the network connection fails and the message

"Could not fin a version that

fi the requirement xxx" is displayed, rectify

the fault by referring to 5.1 What Do I Do If "Could not

a version that

the requirement xxx" Is Displayed When pip3.7.5 install Is Run?.

----End

2.3 Procedure

Prerequisites

You have prepared for the installation by referring to 2.2 Preparations for Installation.

Obtain the development kit packages Ascend-cann-toolkit_{version}_linux- x86_64_gcc7.3.0.run and Ascend-cann-toolkit_{version}_linux- aarch64_gcc7.3.0.run by referring to 2.1 Obtaining Software Packages.

Procedure

Step 1 Log in to the installation environment as the installation user of the software package.

Ensure that the installation user of the software packages is the same as the installation dependency user in 2.2 Preparations for Installation.

Step 2 Upload the development kit obtained in 2.1 Obtaining Software Packages to any directory (for example, /home/package) in the installation environment.

You need to obtain the two software packages applicable to Ubuntu x86 and Ubuntu ARM, upload the two software packages, and perform the entire installation process from Step 4 to Step 7.

Step 3 Go to the directory where the software package is stored. Step 4 Grant the execute permission on the software package.

chmod +x *.run

NOTE

In the preceding command, *.run indicates the development kit Ascend-cann- toolkit_{version}_linux-{arch}_gcc7.3.0.run. Replace it with the actual package name.

Step 5 Run the following command to check the consistency and integrity of the software package installation fi

./*.run --check

Step 6 Create a software installation path.

● If you need to specify the installation path, you need to create it fir For example, if the installation path is /home/work, run the mkdir -p /home/ work command to create an installation path and then select the path to install the software.

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

9

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

If you do not specify an installation path, the software is installed in the default path. Table 2-4 lists the default paths.

Table 2-4 Software package installation paths

Item

Directory

 

 

 

Default

root user: /usr/local/Ascend

installation

Non-root user: ${HOME}/Ascend

path of

 

 

software

 

 

packages

 

 

 

 

Installation log

${install_path}/ascend-toolkit/{version}/{arch}-linux-

path

gccx.x.x/ascend_install.log

 

 

Path for

${install_path}/ascend-toolkit/{version}/{arch}-linux-

recording

gccx.x.x/ascend_toolkit_install.info

information

 

 

such as the

 

 

software

 

 

package

 

 

version, CPU

 

 

architecture,

 

 

GCC version,

 

 

and installation

 

 

path after the

 

 

installation

 

 

 

 

 

Table 2-5 describes the variables in Table 2-4.

Table 2-5 Variable description

Variable

Description

 

 

 

{version}

Version directory, which is named after the

 

version number of a software package.

 

NOTE

 

 

Multiple versions can be installed, which are

 

ff r n

by version numbers.

 

 

{arch}-linux-gccx.x.x

Architecture directory, which is named after

 

the combination of the CPU architecture,

 

Linux branch, and GCC version of a software

 

package.

 

 

NOTE

 

 

Multiple versions can be installed.

 

 

${HOME}

Current user name.

 

 

${install_path}

Software package installation path.

 

 

 

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

10

Atlas Intelligent Edge

 

CANN Software Installation Guide (A500-3000,

 

A500-3010)

2 Installing the Development Environment

Step 7 Install the software. (The following commands support --install-for-all and -- install-path=<path>. For details about the parameters, see 6.1 Parameters.)

If the installation is performed as a non-root user, run the following command:

./*.run --install

If the installation is performed as the root user:

– As the default running user HwHiAiUser, run the following command:

./*.run --install

– As a

c fi running user, run the following command:

./*.run --install-username=username --install-usergroup=usergroup --

install

 

where, --install-username and --install-usergroup are used to specify the running users.

NOTE

● If the installation is performed by the root user, do not to specify the installation path in the directory of a non-root user. Otherwise, the root user fi may be replaced by a nonroot user for privilege escalation.

The --quiet option is not supported when the development kit Ascend-cann- toolkit_{version}_linux-{arch}_{gcc_version}.run is installed in an x86 system.

If the following information is displayed during the installation of the development kit

Ascend-cann-toolkit_{version}_linux-{arch}_{gcc_version}.run in the x86 system, asking you whether to perform a hot reset, enter n. After the installation is complete, restart the OS for the setting to take ff c In the current version, only n is supported.

The installation of aicpu_kernels needs to restart the device to take ff c do you want to hot_reset the device? [y/n] n

For more installation modes, see 6.1 Parameters.

 

 

If the following information is displayed, the software is successfully installed:

 

 

[INFO] xxx install success

 

 

[INFO] process end

 

xxx indicates the name of the software package to be installed.

 

----End

2.4

 

the Compilation Environment

The OS and architecture of the development environment are ff r n from those of the operating environment. Therefore, you need to install the cross-compiler in the development environment. For details, see Table 2-6.

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

11

Atlas Intelligent Edge

CANN Software Installation Guide (A500-3000,

A500-3010)

 

 

2 Installing the Development Environment

 

Table 2-6 Cross-compiler installation

 

 

 

 

 

 

 

OS and

OS and

 

Compilation Environment

 

Architectu

Archite

 

 

 

 

re of the

cture of

 

 

 

 

Developm

the

 

 

 

 

ent

Operati

 

 

 

 

Environm

ng

 

 

 

 

ent

Environ

 

 

 

 

 

ment

 

 

 

 

Ubuntu18.

Ubuntu

 

Run the aarch64-linux-gnu-g++ --version command in

 

04+x86_64

18.04+A

 

the development environment as the installation user of

 

 

rm64

 

the software package to check whether g++ has been

 

 

 

 

installed. If not, run the following command to install g

 

 

 

++:

 

 

 

 

 

sudo apt install g++-aarch64-linux-gnu

 

 

 

 

 

 

 

2.5 Developing Applications

After the development environment is set up, developers can develop applications in the development environment. For details, see the Atlas Intelligent Edge Solution V100R020C00 Application Software Development Guide.

2.6 Verifying Applications

2.6.1 Description

Prepare an Atlas 500 AI edge station by referring to 3 Installing the Operating Environment and perform the following operations on the edge station.

2.6.2 Creating an Inference Container Image

Prerequisites

In the container scenario, install Docker 18.03 or later.

● Obtain the ffl n inference engine package and service inference program package by referring to Table 2-7. The user environment needs to connect to the network to pull images. If the network is not connected, see 4.1

a System Network Proxy.

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

12

Atlas Intelligent Edge

 

 

CANN Software Installation Guide (A500-3000,

 

 

A500-3010)

2 Installing the Development Environment

 

Table 2-7 Required software

 

 

 

 

 

 

 

Software Package

Description

How to Obtain

 

 

 

 

 

A500-3000-

ffl n inference engine

Link

 

nnrt_{version}_linux-

package

 

 

aarch64_gcc7.3.0.run

{version} indicates the

 

 

 

 

 

 

software package

 

 

 

version.

 

 

 

 

 

 

c rfi

Required for creating an

Prepared by

 

 

image

users

 

 

 

 

 

Service inference program

Collection of service

Prepared by

 

package

inference programs.

users

 

 

The .tar and .tgz

 

 

 

formats are supported.

 

 

 

The compressed

 

 

 

package format of the

 

 

 

service inference

 

 

 

program must be

 

 

 

supported by the

 

 

 

compression program in

 

 

 

the container. In

 

 

 

addition, the command

 

 

 

for decompressing the

 

 

 

service inference

 

 

 

program package in

 

 

 

install.sh must map the

 

 

 

actual format.

 

 

 

 

 

 

install.sh

Installation script of the

 

 

 

service inference

 

 

 

program.

 

 

 

 

 

 

run.sh

Script for running the

 

 

 

service inference

 

 

 

program.

 

 

 

 

 

Procedure

Step 1 Upload the software package to the same directory (for example, /home/test) on the edge station.

A500-3000-nnrt_{version}_linux-aarch64_gcc7.3.0.run

Service inference program package

Step 2 Perform the following steps to create a

c rfi

1.Log in to the edge station as the root user and run the id HwHiAiUser command to query and record the UID and GID of the HwHiAiUser user on the host.

2.Go to the software package upload directory in Step 1 and run the following

command to create a c rfi (for example,

):

Issue 01 (2021-03-02)

Copyright © Huawei Technologies Co., Ltd.

13

Loading...
+ 37 hidden pages