1.docker 及环境搭建略
2.宿主机驱动安装略
3.宿主机中能正确使用npu-smi
4.docker 拉取略
5.docker 容器启动
docker run -itd
--device=/dev/davinci0
--device=/dev/davinci_manager
--device=/dev/devmm_svm
--device=/dev/hisi_hdc
-v /run/board_cfg.ini:/run/board_cfg.ini
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
-v /home/data/miniD/driver/lib64:/home/data/miniD/driver/lib64
-v /data:/data
--name ubuntu20_v1 ubuntu:20.04
6.进入容器
docker exec -it ubuntu20_v1 /bin/bash
7.容器内配置驱动路径
export LD_LIBRARY_PATH=/home/data/miniD/driver/lib64/:$LD_LIBRARY_PATH
8.npu-smi
- 更新系统
apt update
apt install vim
10.更换源,ubuntu20.04(中科大源)
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ focal main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ focal main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main multiverse restricted universe
11.安装python3
apt install python3-pip
12.安装cann
./Ascend-cann-toolkit_6.0.1_linux-aarch64.run --full