服务器环境说明

George

25-04-16

25-03-04

| 浏览量:👀  |  返回 <主页>

常规操作简介

登录服务器

  1. 确认要登录到服务器的本地电脑,已接入校园网。当前,服务器只能在校园网内访问到。

  2. 在本地电脑上启动终端 或 ssh 工具。比如 Windows 下的 cmd 或 powershell,macOS 下的 terminal(终端)。以下是终端为例。

  3. 在本地电脑终端上输入以下命令登录服务器:
    ssh -p 20305 用户名@172.18.144.9

    (1)用户名,替换为服务器管理员给你的用户名。
    (2)其他,不要改变,按原样输入命令。
    (3)首次用 ssh 登录服务器,屏幕还可能提示和 ssh 相关的信息,输入 yes 即可。

  4. 如果上一步正确,则屏幕提示输入密码。
    输入密码时,屏幕不会显示输入的密码,继续输入;密码输入完成了,按 [回车] 键。

  5. 输入正确的用户名和密码后,就可以登录到服务器了。



以下是登录样例,供参考。

~ % ssh -p 20305 zyq@172.18.144.9 (<-- 输入 ssh 命令登录服务器)
zyq@172.18.144.9's password: (<-- 此处输入密码,屏幕不会显示所输入的密码)

Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.10.0+ aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

zyq@davinci-mini:~$ (<-- 登录成功啦!)
                


昇腾开发板说明

昇腾官网相关链接:
- 昇腾开发板(Atlas 200I DK A2) 简介
- 昇腾开发板快速开始

1、将烧录好的 SD 卡,插入开发板

断电状态下(即开发板没有通电源),插入已经烧录好的 SD 卡。如何烧录,可参考官网相关链接,此处从略。

2、给开发板插上电源

插上电源后,开发板上的三个绿灯,会逐个点亮。稍等一会后,三个绿灯都亮了,则表示启动成功。

3、用网线连接电脑和开发板

3.0 (可选)电脑如果没有空闲网口,可在电脑 USB 上插 USB转网口 的转接器,以获得一个空闲网口。
3.1 网线一端,插入电脑的空闲网口。
3.2 网线另一端,插入开发板的网口。开发板有 2 个网口,上下排列,要插入上面那个网口

3.3 设置电脑的 IP 地址,以便通过网线访问开发板。

4、测试电脑和开发板之间网络是否连通

在电脑上启动命令行终端程序(比如 Windows 操作系统的 cmd,或者 powershell),并在命令行终端上执行
ping 192.168.137.100
如能看到如下信息,则表明电脑和开发板之间的网络是连通的。

~ % ping 192.168.137.100
PING 192.168.137.100 (192.168.137.100): 56 data bytes
64 bytes from 192.168.137.100: icmp_seq=0 ttl=64 time=0.450 ms
64 bytes from 192.168.137.100: icmp_seq=1 ttl=64 time=0.701 ms
64 bytes from 192.168.137.100: icmp_seq=2 ttl=64 time=0.775 ms
64 bytes from 192.168.137.100: icmp_seq=3 ttl=64 time=0.611 ms
^C
--- 192.168.137.100 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.450/0.634/0.775/0.121 ms                
               

5、通过 ssh 登录开发板

在电脑的命令行终端中执行如下命令登录开发板:
ssh HwHiAiUser@192.168.137.100
屏幕提示
HwHiAiUser@192.168.137.100's password:
时,输入密码
Mind@123
输入密码完成后按回车键。
密码输入过程中,屏幕不会有回显,这是正常的,不必担心。
当输入正确密码后,就可以登录开发板,并看到如下信息。

~ % ssh HwHiAiUser@192.168.137.100
HwHiAiUser@192.168.137.100's password: 
    _                                _             _               _     _  _   
   / \    ___   ___  ___  _ __    __| |         __| |  ___ __   __| | __(_)| |_ 
  / _ \  / __| / __|/ _ \| '_ \  / _` | _____  / _` | / _ \\ \ / /| |/ /| || __|
 / ___ \ \__ \| (__|  __/| | | || (_| ||_____|| (_| ||  __/ \ V / |   < | || |_ 
/_/   \_\|___/ \___|\___||_| |_| \__,_|        \__,_| \___|  \_/  |_|\_\|_| \__|
                                                                                                    
Welcome to Atlas 200I DK A2
This system is based on Ubuntu 22.04 LTS (GNU/Linux 5.10.0+ aarch64)

This system is only applicable to individual developers and cannot be used for commercial purposes.
                    
By using this system, you have agreed to the Huawei Software License Agreement.
Please refer to the agreement for details on https://www.hiascend.com/software/protocol
                    
Reference resources
* Home page: https://www.hiascend.com/hardware/developer-kit-a2
* Documentation: https://www.hiascend.com/hardware/developer-kit-a2/resource
* Online courses: https://www.hiascend.com/edu/courses
* Online experiments: https://www.hiascend.com/zh/edu/experiment
* Forum: https://www.hiascend.com/forum/
* Code: https://gitee.com/HUAWEI-ASCEND/ascend-devkit


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

(base) HwHiAiUser@davinci-mini:~$                 
                

6、启动开发板的预置样例

依次执行以下命令:

(base) HwHiAiUser@davinci-mini:~$ cd samples
(base) HwHiAiUser@davinci-mini:~/samples$ cd notebooks   
(base) HwHiAiUser@davinci-mini:~/samples/notebooks$ ./start_notebook.sh     

可看到如下信息,表示开发板预置样例启动了。

[I 2025-03-17 20:14:01.452 ServerApp] Package jupyterlab took 0.0001s to import
[I 2025-03-17 20:14:01.529 ServerApp] Package jupyter_lsp took 0.0751s to import
[W 2025-03-17 20:14:01.530 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2025-03-17 20:14:01.557 ServerApp] Package jupyter_server_terminals took 0.0263s to import
[I 2025-03-17 20:14:01.560 ServerApp] Package notebook_shim took 0.0001s to import
[W 2025-03-17 20:14:01.560 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2025-03-17 20:14:01.562 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2025-03-17 20:14:01.580 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2025-03-17 20:14:01.602 ServerApp] jupyterlab | extension was successfully linked.
[I 2025-03-17 20:14:02.621 ServerApp] notebook_shim | extension was successfully linked.
[I 2025-03-17 20:14:02.701 ServerApp] notebook_shim | extension was successfully loaded.
[I 2025-03-17 20:14:02.710 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2025-03-17 20:14:02.714 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2025-03-17 20:14:02.717 LabApp] JupyterLab extension loaded from /usr/local/miniconda3/lib/python3.9/site-packages/jupyterlab
[I 2025-03-17 20:14:02.717 LabApp] JupyterLab application directory is /usr/local/miniconda3/share/jupyter/lab
[I 2025-03-17 20:14:02.720 LabApp] Extension Manager is 'pypi'.
[I 2025-03-17 20:14:02.732 ServerApp] jupyterlab | extension was successfully loaded.
[I 2025-03-17 20:14:02.733 ServerApp] Serving notebooks from local directory: /home/HwHiAiUser/samples/notebooks
[I 2025-03-17 20:14:02.733 ServerApp] Jupyter Server 2.5.0 is running at:
[I 2025-03-17 20:14:02.733 ServerApp] http://192.168.137.100:8888/lab?token=696173ee0cbed331a0e360bf5a2b851cdf81dde0850fce7d
[I 2025-03-17 20:14:02.733 ServerApp]     http://127.0.0.1:8888/lab?token=696173ee0cbed331a0e360bf5a2b851cdf81dde0850fce7d
[I 2025-03-17 20:14:02.734 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2025-03-17 20:14:02.746 ServerApp] 
                        
To access the server, open this file in a browser:
    file:///home/HwHiAiUser/.local/share/jupyter/runtime/jpserver-38492-open.html
Or copy and paste one of these URLs:
    http://192.168.137.100:8888/lab?token=696173ee0cbed331a0e360bf5a2b851cdf81dde0850fce7d
    http://127.0.0.1:8888/lab?token=696173ee0cbed331a0e360bf5a2b851cdf81dde0850fce7d
           
                

http://192.168.137.100:8888/lab?token=696173ee0cbed331a0e360bf5a2b851cdf81dde0850fce7d 那行,复制到本地电脑的浏览器中。(token后面的取值,会每次不一样,不要复制此处的样例)

界面样例截图如下:
image-functions

如何使用预置样例,请参考昇腾官网-体验预置样例

7、运行所有样例

运行所有样例,并能理解样例原理。

8、关机

1、电源插头的附近,有3个小按钮。长按中间那个按钮,约几秒钟后松开,稍后等待3个绿灯逐个熄灭,剩余一个绿灯亮时,就可以拔掉电源了。
2、或者,切换到 root 用户关机,执行以下命令。也是要等一个绿灯亮时,才可以拔掉电源了。root 用户口令是 Mind@123

(base) HwHiAiUser@davinci-mini:~/samples/notebooks$ su root
Password: 
(base) root@davinci-mini:/home/HwHiAiUser/samples/notebooks# shutdown -h now
Connection to 192.168.137.100 closed by remote host.
Connection to 192.168.137.100 closed.
    

9、任务


任务#1:完成其他物体或人物的图片识别

相关步骤建议如下:


任务#2:完成其他物体或人物的视频识别

相关步骤建议如下:


任务#3:通过摄像头完成物体或人物的识别

相关步骤建议如下:

开发板课题

1、智能车运动控制

智能小车通过摄像头感知周围环境自主地进行运动控制,采集环境数据后在开发者套件上进行AI推理,根据推理结果发出指令控制小车的运动状态。小车运动状态的控制需要借助ESP32微控制器,使用Arduino平台可以对其进行嵌入式开发。主控与小车主体间控制指令的发出和数据的返回,需要通过串口协议进行双向通信。 智能小车从底层硬件到上层AI应用需要完成的任务。

实现手动控制小车。通过键盘按键,控制小车:前进、左转、后退、右转、逆时针旋转、顺时针旋转、加速(小车运动状态与静止状态均可以调整)、减速(小车运动状态与静止状态均可以调整)、捕获当前摄像头的图片、暂时停车,等。

参考样例图片:智能小车

2、机械臂抓取物体

智能机械臂基于Atlas 200I DK A2 开发者套件的深度学习AI推理功能和机械臂的二次开发,通过串口硬件通信和python接口软件支持实现。

任意位置积木分拣

基于开发者套件的内置YoloV5神经网络模型的推理结果,标记十字标定板中积木的位置,并使用机械臂进行分拣。

任意位置积木堆叠

基于开发者套件的内置YoloV5神经网络模型的推理结果,标记十字标定板中积木的位置,并使用机械臂进行堆叠。

参考样例图片:机械臂

3、聊天机器人

聊天机器人应用是通过对大型语言模型进行压缩,将模型转换为ONNX或OM模型,使其能够全部或部分运行在开发者套件的昇腾AI处理器上并加速。使用流式输出对话的方式在网页前端收集数据,进行文本解析后,通过后端放入消息队列,后端推理进程获取队列中的文本后,使用大型语言模型进行推理并返回推理结果至前端页面。最终实现与聊天机器人进行对话的场景。