HUAWEI Atlas 200 DK, V100R020C10 User Manual

Atlas 200 DK V100R020C10
Environment Deployment Guide
Issue 01
Date 2021-04-07
HUAWEI TECHNOLOGIES CO., LTD.
Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved.
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 specied 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 eort 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-04-07) Copyright © Huawei Technologies Co., Ltd. i
Atlas 200 DK Environment Deployment Guide Contents

Contents

1 Introduction.............................................................................................................................. 1
2 Preparing Accessories and a Development Server.......................................................... 2
3 Installing Hardware................................................................................................................ 5
3.1 Removing the Top Cover....................................................................................................................................................... 5
3.2 Installing a Camera (PCB IT21DMDA)............................................................................................................................. 7
3.3 Installing a Camera (PCB IT21VDMB)........................................................................................................................... 12
4 Setting up the Environments..............................................................................................17
5 Setting Up the Hardware Environment........................................................................... 18
5.1 Creating an SD Card............................................................................................................................................................ 18
5.1.1 Introduction......................................................................................................................................................................... 18
5.1.2 Creating an SD Card with a Card Reader..................................................................................................................18
5.1.3 Creating an SD Card Without a Card Reader.......................................................................................................... 23
5.2 Connecting Atlas 200 DK to Ubuntu Server................................................................................................................ 28
5.3 Changing the Atlas 200 DK User Password................................................................................................................. 33
5.4 Deploying pyACL................................................................................................................................................................... 34
6 Setting up the Development Environment..................................................................... 36
6.1 Overview.................................................................................................................................................................................. 36
6.2 Installing CANN Toolkit Separately................................................................................................................................ 38
6.2.1 Obtaining Software Packages....................................................................................................................................... 38
6.2.2 Conguring Ubuntu (x86).............................................................................................................................................. 38
6.2.3 Installing the Development Kit..................................................................................................................................... 42
6.2.4 Post-installation Actions................................................................................................................................................. 43
6.3 (Optional) Installing MindStudio.................................................................................................................................... 44
6.4 Deploying the Media Module........................................................................................................................................... 45
7 Hands-on Your First Application........................................................................................46
8 Common Operations............................................................................................................ 47
8.1 Powering on Atlas 200 DK................................................................................................................................................. 47
8.2 Powering o the Atlas 200 DK Developer Board...................................................................................................... 52
8.3 Connecting the Atlas 200 DK over a Serial Port........................................................................................................ 52
8.4 Checking the Software Versions of Atlas 200 DK......................................................................................................54
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. ii
Atlas 200 DK Environment Deployment Guide Contents
8.5 Checking the Version of the Motherboard of the Developer Board................................................................... 55
8.6 Checking the Version of the Atlas 200 AI Accelerator Module............................................................................. 58
8.7 Viewing the Channel to Which a Camera Belongs................................................................................................... 62
8.8 Installing the Windows USB Network Adapter Driver............................................................................................. 63
8.9 Changing the Atlas 200 DK IP Address......................................................................................................................... 66
8.10 Setting User Account Expiry Date.................................................................................................................................67
8.11 Conguring a System Network Proxy......................................................................................................................... 68
8.12 Parameters............................................................................................................................................................................ 68
8.13 Conguring the PIP Source............................................................................................................................................. 70
9 FAQs.......................................................................................................................................... 71
9.1 What Do I Do If a Redundant Mounted Disk Appears Due to Manual Removal of the SD Card During
SD Card Creation?........................................................................................................................................................................71
9.2 What Do I Do If the Trust Relationship Between the Ubuntu Server and the Developer Board Fails to
Be Established?............................................................................................................................................................................. 72
9.3 What Do I Do If Atlas 200 DK Cannot Connect to Ubuntu Server?....................................................................72
9.4 What Do I Do If "Could not nd a version that satises the requirement xxx" Is Displayed When
pip3.7.5 Install Is Run?............................................................................................................................................................... 76
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. iii
NO TE
Atlas 200 DK Environment Deployment Guide 1 Introduction

1 Introduction

Huawei Atlas 200 Developer Kit (Atlas 200 DK for short) is a developer board product based on the Huawei Ascend 310 AI Processor. It enables one-stop development of AI applications.
This document describes the preparations for using the Atlas 200 DK to develop and run AI applications, including creating an SD card, connecting the Atlas 200 DK to the Ubuntu server, and installing the development tool.
The following shows the system block diagram of the Atlas 200 DK:
Figure 1-1 Connection between the Atlas 200 DK and MindStudio
In the preceding gure, 192.168.1.2/192.168.0.2 is the IP address of the Atlas 200 DK, which can be selected during card making.
The Atlas 200 DK contains the Hi3559 camera module and Atlas 200 AI accelerator module. The PC where MindStudio is located is connected to the Atlas 200 DK through the USB port or network cable.
MindStudio contains the development kit and tool modules (such as the model management tool, compilation tool, and log tool). The development kit provides the library compilation.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 1
les, tools, dependencies, and common header les required for device

Atlas 200 DK Environment Deployment Guide 2 Preparing Accessories and a Development Server

2 Preparing Accessories and a
Development Server
This section describes how to prepare accessories and a development server for using Atlas 200 DK.
Preparing Accessories
Table 2-1 lists the accessories needed to be purchased in advance for using the
Atlas 200 DK.
Table 2-1 Accessories
Name
SD card Creates the boot system for the
Card reader or jumper cap/ wire
(Re com me nde d) Car d Rea der
Description Suggestions
Tested and recommended
Atlas 200 DK.
For details about how to prepare an SD card using a card reader, see 5.1.2 Creating an SD Card
with a Card Reader.
SD cards:
● Samsung 64 GB UHS-I U3 Class 10
● Kingston 64 GB UHS-I U1 Class 10
USB 3.0 compatible
Jum per cap / wire
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 2
For details about how to prepare an SD card using a jumper cap/ wire, see 5.1.3 Creating an SD
Card Without a Card Reader.
Jumper cap, with 2.54 mm spacing
Jumper wire, female to female, with 2.54 mm spacing
Atlas 200 DK Environment Deployment Guide 2 Preparing Accessories and a Development Server
Name Description Suggestions
Type-C cable Connects to the Ubuntu server.
For details, see 5.2 Connecting
Atlas 200 DK to Ubuntu Server.
Network cable Connects to the Ubuntu server.
For details, see 5.2 Connecting
Atlas 200 DK to Ubuntu Server.
Camera Provides video streams for the
Atlas 200 DK. For details, see 3.2
Installing a Camera (PCB IT21DMDA) and 3.3 Installing a Camera (PCB IT21VDMB).
(Optional) Camera support
Fixes the camera. For details, see
3.2 Installing a Camera (PCB IT21DMDA) and 3.3 Installing a Camera (PCB IT21VDMB).
USB 3.0 Type-C cable
Common network cable with RJ45 connectors
Raspberry Pi cameras are recommended.
Model: Raspberry Pi v2.1
For a Raspberry Pi camera, if the Atlas 200 DK uses the IT21DMDA mainboard, you also need to prepare a 15-pin yellow Raspberry Pi camera cable.
Raspberry Pi transparent camera support
(Optional) Serial cable
Preparing a Server
Prepare a server or PC running Ubuntu (x86).
When creating a bootable SD card for the Atlas 200 DK, the card reader or Atlas 200 DK can be connected to the Ubuntu server over the USB port. For details, see 5.1 Creating an SD Card.
The Ubuntu server can be used to set up the development environment. For details, see 6.1 Overview.
Click here to download an Ubuntu 18.04.4 or 18.04.5 release and install it.
You can download the Ubuntu Desktop edition of ubuntu-18.04.xx-desktop-
amd64.iso or the Ubuntu Server edition of ubuntu-18.04.xx-server­amd64.iso.
Used for viewing the boot logs when the Atlas 200 DK boot indicator is abnormal, or the SD card is successfully prepared but the UI Host cannot be accessed. For details, see 9.3 What Do I Do
If Atlas 200 DK Cannot Connect to Ubuntu Server?
USB-to-TTL serial cable with 3.3 V interface level
x
Python 2.7 and Python 3.
At lease 20 GB is available on the Ubuntu OS.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 3
must be installed in the Ubuntu OS.
Atlas 200 DK Environment Deployment Guide 2 Preparing Accessories and a Development Server
The Ubuntu system memory is at least 4 GB.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 4
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware

3 Installing Hardware

3.1 Removing the Top Cover

3.2 Installing a Camera (PCB IT21DMDA)
3.3 Installing a Camera (PCB IT21VDMB)
3.1 Removing the Top Cover
To use a camera or an internal port, remove the top cover from the Atlas 200 DK as follows:
Step 1 Check whether a camera cable is lead out from the Atlas 200 DK.
If yes, go to Step 3.
If no, go to Step 2.
Step 2 If no camera cable is lead out from the Atlas 200 DK, pull the plastic latch
upwards to loosen the top cover, as shown in Figure 3-1.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 5
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-1 Removing the top cover - 1
Step 3 If a camera cable is lead out from the Atlas 200 DK, insert a at-head screwdriver
into the groove between the top cover and the bottom plate, and rotate the screwdriver to pry
o the top cover, as shown in in Figure 3-2.
Figure 3-2 Removing the top cover - 2
Step 4 Remove the top cover.
----End
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 6
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware

3.2 Installing a Camera (PCB IT21DMDA)

Procedure
Step 1 Replace the white
camera at cable.
1. Remove the black
Figure 3-3 Flat ribbon cable fastener
at cable delivered with the Raspberry Pi camera with a yellow
at cable fastener from the camera. See Figure 3-3.
2. Take out the white camera at cable. See Figure 3-4.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 7
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-4 White camera at cable
3. Place the metal wire at the wider end of the yellow at ribbon cable upwards and horizontally insert it into the cable slot of the camera until it is fastened. See Figure 3-5.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 8
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-5 Connecting the camera
4. Secure the black at ribbon cable fastener.
Step 2 Install the xing lm on the camera head to the yellow camera at cable. See
Figure 3-6.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 9
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-6 Installing the xing lm
Step 3 Connect the at ribbon cable of the camera to the Atlas 200 DK developer board.
1. Remove the camera connector fastener from the Atlas 200 DK developer board. See Figure 3-7.
Figure 3-7 Removing the black fastener
2. Place the metal wire at the narrower end of the yellow at ribbon cable upwards and horizontally insert it into the camera connector CAMERA0 or CAMERA1 on the Atlas 200 DK developer board until the cable is fastened. Insert the fastener. See Figure 3-8.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 10
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-8 Inserting the fastener
Step 4 Install the top cover of the Atlas 200 DK developer board to the original position.
Step 5 Install the camera support.
1. Use the clip on the camera support to clamp the xing lm. See Figure 3-9.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 11
NO TE
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-9 Installing the camera support
2. Place the camera on the camera support, as shown in the preceding gure.
– Before using the camera, remove its protective lm.
– The base of the camera support has double-sided tape, which can be used to
secure the support on the desktop to ensure that the camera is securely installed.
----End

3.3 Installing a Camera (PCB IT21VDMB)

Procedure
Step 1 Replace the white
camera at cable.
1. Remove the black at cable fastener from the camera. See Figure 3-10.
at cable delivered with the Raspberry Pi camera with a black
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 12
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-10 Removing the at cable fastener
2. Take out the white camera at cable. See Figure 3-11.
Figure 3-11 White camera
at cable
3. Place the metal wire on the black camera at cable (silkscreen with TO CAMERA) upwards and horizontally insert it into the cable slot of the camera until it is fastened. See Figure 3-12.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 13
NO TICE
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-12 Connecting the camera
4. Secure the black at ribbon cable fastener.
Step 2 Install the xing lm on the camera head to the black camera at cable.
Step 3 Connect the
at ribbon cable of the camera to the Atlas 200 DK developer board.
● The maximum opening angle of the connector fastener is 90 degrees. When
you open the connector fastener upwards, ensure that the opening angle does not exceed 90 degrees.
● Do not open the connector fastener in the reverse direction. Otherwise, the
connector will be broken.
1. Open the camera connector fastener of the Atlas 200 DK developer board by 90 degrees from inside. See Figure 3-13.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 14
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Figure 3-13 Opening the black fastener
2. Place the black wire on the black camera at cable (silkscreen with TO MAIN BD) upwards and horizontally insert it into the camera connector CAMERA0 or CAMERA1 on the Atlas 200 DK developer board until the cable is fastened. Secure the fastener. See Figure 3-14.
Figure 3-14 Securing the fastener
Step 4 Install the top cover of the Atlas 200 DK developer board to the original position.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 15
NO TE
Atlas 200 DK Environment Deployment Guide 3 Installing Hardware
Step 5 Install the camera support.
1. Use the clip on the camera support to clamp the xing lm. See Figure 3-15.
Figure 3-15 Installing the camera support
2. Place the camera on the camera support, as shown in the preceding gure.
– Before using the camera, remove its protective lm.
– The base of the camera support has double-sided tape, which can be used to
secure the support on the desktop to ensure that the camera is securely installed.
----End
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 16
Atlas 200 DK Environment Deployment Guide 4 Setting up the Environments

4 Setting up the Environments

Set up the hardware operating environment and development environment for the Atlas 200 DK as follows.
Figure 4-1 Atlas 200 DK environment setup
Operating environment
Create a bootable SD card for the Atlas 200 DK.
If Python is used to develop AI applications, the pyACL package needs to be deployed on the Atlas 200 DK after the Atlas 200 DK is connected to the Ubuntu development server.
Development environment
Set up the development environment by referring to 6 Setting up the
Development Environment.
workow
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 17
NO TICE
Atlas 200 DK Environment Deployment Guide 5 Setting Up the Hardware Environment

5 Setting Up the Hardware Environment

5.1 Creating an SD Card

5.2 Connecting Atlas 200 DK to Ubuntu Server
5.3 Changing the Atlas 200 DK User Password
5.4 Deploying pyACL
5.1 Creating an SD Card

5.1.1 Introduction

You can create a system boot disk for the Atlas 200 DK by preparing an SD card.
You can use either of the following methods to prepare an SD card:
If a card reader is available, insert the SD card into the card reader, connect the card reader to the USB port of the Ubuntu server, and run the SD card preparation script.
If no card reader is available, insert the SD card into the card slot of the Atlas 200 DK, use a jumper cap/wire to connect the pins of the Atlas 200 DK, connect the Atlas 200 DK to the USB port of the Ubuntu server, and run the SD card preparation script.
During SD card preparation, the default user HwHiAiUser is automatically created for running the applications.
The default login password of the HwHiAiUser user is Mind@123.

5.1.2 Creating an SD Card with a Card Reader

This section describes how to connect a card reader to the Ubuntu server over the USB port and run SD card preparation scripts with a card reader.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 18
NO TE
Atlas 200 DK Environment Deployment Guide 5 Setting Up the Hardware Environment
Hardware Preparation
Prepare a 16-GB or larger SD card.
The SD card will be formatted. Back up your data in advance.
Software Preparation
Table 5-1 describes how to obtain the Driver packages and
and the Ubuntu OS image.
Table 5-1 Required les
Descri ption
Ubuntu OS image
Driver packag e and
runle
of the Atlas 200 DK
File Name Details URL
ubuntu-18.04.xx­server-arm64.iso
A200dk-npu­driver-
version}
ubuntu18.04­aarch64­minirc.tar.gz
{software
-
OS image of the Atlas 200 DK.
Ubuntu OS version: 18.04.4 or
18.04.5.
Must be a server release for ARM hardware.
Driver package, including OS peripheral software, AI software stack, maintenance and testing software, as well as drivers.
During SD card preparation, Firmware information is obtained from the Driver package, so the Firmware component is not needed.
runle of Atlas 200 DK
Link
Link
1. Choose AI Developer Kit from Product Series.
2. Choose Atlas 200 DK AI Developer Kit from Product Model.
3. Choose
1.0.8.alpha
from Version.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 19
NO TICE
Atlas 200 DK Environment Deployment Guide 5 Setting Up the Hardware Environment
Descri ption
File Name Details URL
Ascend-cann­minirc_
version}
8.04-aarch64.zip
{software
_ubuntu1
CANN software package, including the AI CPU OPP and AscendCL runle.
During SD card creation, unzip the package and perform installation as the
HwHiAiUser user. The
Link
Download the
3.1.0.alpha001
version software package.
LD_LIBRARY_PATH
environment variable will be automatically set in the .bashrc
HwHiAiUser user.
export LD_LIBRARY_PATH=/ home/HwHiAiUser/Ascend/ acllib/lib64
le of the
Procedure
Step 1 Insert the SD card into the card reader and then insert the card reader into the
Step 2 Run the following commands on the Ubuntu server to install the qemu-user-static,
Step 3 Run the following command as the root user on the Ubuntu server to create a
Keep the names of the downloaded les unchanged.
USB port of the Ubuntu server.
binfmt-support, YAML, and cross compiler:
su - root
Update the sources:
apt-get update
Install the Python dependencies:
pip3 install pyyaml
apt-get install qemu-user-static binfmt-support python3-yaml gcc-aarch64­linux-gnu g++-aarch64-linux-gnu
card creation project directory:
mkdir /home/ascend/mksd
The card creation project directory is
Step 4 Upload the obtained Ubuntu OS image package and Driver packages of the Atlas
200 DK to the card creation project directory (for example, /home/ascend/mksd).
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 20
user-dened.
NO TE
NO TE
NO TICE
Atlas 200 DK Environment Deployment Guide 5 Setting Up the Hardware Environment
Step 5 Run the following commands in the card creation project directory (for example, /
home/ascend/mksd) to download the card creation scripts:
Download the make_sd_card.py script:
wget https://raw.githubusercontent.com/Ascend/tools/master/makesd/ for_1.0.8.alpha/make_sd_card.py
Download the make_ubuntu_sd.sh script:
wget https://raw.githubusercontent.com/Ascend/tools/master/makesd/ for_1.0.8.alpha/make_ubuntu_sd.sh
You can modify the following parameters in make_sd_card.py to congure the IP addresses of the USB NIC and NIC of the Atlas 200 DK:
NETWORK_CARD_DEFAULT_IP: IP address of the NIC. Defaults to 192.168.0.2.
USB_CARD_DEFAULT_IP: IP address of the USB NIC. Defaults to 192.168.1.2.
Step 6 Run the SD card preparation scripts.
1. Query the device name of the SD card USB as the root user:
fdisk -l
For example, the device name of the SD card USB is /dev/sda. The device name can be determined by removing and inserting the USB device.
2. Run the make_sd_card.py script.
python3 make_sd_card.py local /dev/sda
local: The SD card is prepared in
oine mode.
/dev/sda: device name of the SD card USB.
The message shown in Figure 5-1 indicates successful SD card preparation.
Figure 5-1 Message indicating successful SD card preparation
If card preparation fails, check the log les in the sd_card_making_log folder in the current directory.
Step 7 After the card is successfully prepared, remove the SD card from the card reader
and insert it into the card slot of the Atlas 200 DK.
Step 8 Power on the Atlas 200 DK.
● During the rst power-on and boot process, Firmware upgrade is implemented. After the upgrade is complete, the system reboots automatically. You can install other components after the reboot.
● Do not power o the Atlas 200 DK during the rst boot. Otherwise, the Atlas 200 DK may be damaged. After it is powered
o, wait at least 2s before
powering it on again.
Issue 01 (2021-04-07) Copyright © Huawei Technologies Co., Ltd. 21
Loading...
+ 57 hidden pages