华为云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"]
相关推荐
会周易的程序员11 小时前
5Draft(五帝)测试报告
服务器·c++·分布式·raft·共识算法·共识·算力服务器
李昊哲小课11 小时前
Deepin 25 上安装 Docker CE 实战记录
运维·docker·容器·deepin
pingglala12 小时前
ubuntu-nat模式不能上网解决方法
linux·运维·ubuntu
一技安身12 小时前
【信创】外网aarch64终端安装deepseek Ragflow 迁移至内网银河麒麟服务器
运维·服务器
M哥支付13 小时前
快捷支付 VS 网关支付 安全对比
服务器·网络·其他·微信·金融
考虑考虑13 小时前
ElasticSearch索引命令
运维·后端·elasticsearch
2501_9289962213 小时前
Agent 开发的 API 选型:从 Function Calling 到多模型协作的中科热备底层逻辑
服务器·重构·gitlab
非凡ghost14 小时前
AI修图不“造假“,摄影师的出片效率加速器
服务器·前端·人工智能·电脑
和裕14 小时前
光伏储能定制加强型瓦楞纸箱:降低组件运输隐裂率与售后损耗的核心价值
大数据·运维·网络·人工智能·算法
智购科技无人售货机工厂店14 小时前
2026自动售货机大屏交互设计原则:从信息层级到视觉动线的工程实践~YH
运维·python·单片机·嵌入式硬件·自动化·交互