华为云Ascend310服务器使用

使用华为云服务器

复制代码
cpu: 16vCPUs Kunpeng 920
内存:16GiB   
gpu:'4* HUAWEI Ascend 310
cann: 20.1.rc1
操作系统:Ubuntu aarch64

目的

使用该服务器进行docker镜像编译,测试模型。

已知生产环境:mindx版本为3.0.rc3,npu为310P,cpu为 Kunpeng 920

宿主机cann升级

cann下载地址:https://www.hiascend.com/developer/download/community/result?module=dl+pt+cann\&dl=3.0.0.alpha\&pt=6.0.1.alpha001\&cann=6.0.1.alpha001

npu驱动下载地址:

https://www.hiascend.com/hardware/firmware-drivers/community?product=2\&model=2\&cann=6.3.RC1.alpha001\&driver=1.0.18.alpha

复制代码
升级cann和驱动
chmod +x Ascend-cann-toolkit_6.0.1_linux-aarch64.run
./Ascend-cann-toolkit_6.0.1_linux-aarch64.run --install --install-for-all
reboot

chmod +x A300-3000-npu-driver_6.0.0_linux-aarch64.run
./A300-3000-npu-driver_6.0.0_linux-aarch64.run --full --install-for-all
reboot

查看是否升级成功
npu-smi info

华为云安装docker

docker插件下载地址:https://gitee.com/ascend/ascend-docker-runtime

复制代码
vi /etc/apt/sources.list
deb https://mirrors.huaweicloud.com/docker-ce/linux/ubuntu/ bionic stable
curl -fsSL https://repo.huaweicloud.com/docker-ce/linux/debian/gpg | sudo apt-key add -
apt-get update 
apt-get install -y docker-ce
systemctl start docker
docker version
chmod +x Ascend-docker-runtime_5.0.RC3.1_linux-aarch64.run
./Ascend-docker-runtime_5.0.RC3.1_linux-aarch64.run --install
systemctl restart docker
systemctl enable docker

寻找huawei docker基础镜像

ascendhub.huawei.com

比如 https://ascendhub.huawei.com/#/detail/infer-modelzoo

注意:拉取镜像权限密钥24小时过期,需重新申请。

后续

在基础镜像上,尝试程序编译,调试。

成功后,对应编辑Dockerfile文件,重新打镜像。

比如:

复制代码
FROM ascendhub.huawei.com/public-ascendhub/infer-modelzoo:22.0.0
EXPOSE 80
USER root
COPY ./ /home/cloud/
WORKDIR /home/cloud/
RUN apt update \
        && apt install python3.8 python3.8-dev python3.8-distutils python3.8-venv -y \
        && python3.8 /home/cloud/get-pip.py \
        && python3.8 -m pip install -r /home/cloud/requirements.txt -i https://mirror.baidu.com/pypi/simple
ENV LD_PRELOAD /usr/local/lib/python3.8/dist-packages/torch/lib/libgomp-d22c30c5.so.1
CMD ["/usr/bin/python3.8","/home/cloud/xxxx.py"]
相关推荐
爱吃橘子橙子柚子2 天前
3CPU性能排查总结(超详细)【Linux性能优化】
运维·cpu
舒一笑4 天前
程序员效率神器:一文掌握 tmux(服务器开发必备工具)
运维·后端·程序员
NineData4 天前
数据库管理工具NineData,一年进化成为数万+开发者的首选数据库工具?
运维·数据结构·数据库
梦想很大很大5 天前
拒绝“盲猜式”调优:在 Go Gin 项目中落地 OpenTelemetry 链路追踪
运维·后端·go
Sinclair5 天前
内网服务器离线安装 Nginx+PHP+MySQL 的方法
运维
叶落阁主5 天前
Tailscale 完全指南:从入门到私有 DERP 部署
运维·安全·远程工作
茶杯梦轩5 天前
从零起步学习RabbitMQ || 第二章:RabbitMQ 深入理解概念 Producer、Consumer、Exchange、Queue 与企业实战案例
服务器·后端·消息队列
甲鱼9296 天前
MySQL 实战手记:日志管理与主从复制搭建全指南
运维
YuMiao7 天前
gstatic连接问题导致Google Gemini / Studio页面乱码或图标缺失问题
服务器·网络协议
碳基沙盒8 天前
OpenClaw 多 Agent 配置实战指南
运维