返回列表
[32GB]MindSpore2.2.10-Cann7.0.0.beta1-Python3.9-Euler2.8.3
MindSpore
下载量:402
上传者:duanxinyu
1
0
收藏
版本信息
Python版本:3.9
CANN版本:7.0.0.beta1(社区版)
操作系统版本:Euler2.8
CANN版本:7.0.0.beta1(社区版)
操作系统版本:Euler2.8
使用说明
可在MA和BMS上使用
## 启动指令示例
~~~
docker run -it -u root \
--device=/dev/davinci0 \
--device=/dev/davinci1 \
--device=/dev/davinci2 \
--device=/dev/davinci3 \
--device=/dev/davinci4 \
--device=/dev/davinci5 \
--device=/dev/davinci6 \
--device=/dev/davinci7 \
--device=/dev/davinci_manager \
--device=/dev/devmm_svm \
--device=/dev/hisi_hdc \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/Ascend/toolbox:/usr/local/Ascend/toolbox \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/firmware:/usr/local/Ascend/firmware \
-v /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi \
-v /home/aicc:/home/ma-user/work/aicc \
--name mindspore_ma \
--entrypoint=/bin/bash \
swr.cn-central-221.ovaijisuan.com/dxy/mindspore_kernels:MindSpore2.2.10-cann7.0.0beta1_py_3.9-euler_2.8.3-32GB
~~~
## Dockerfile示例
~~~
FROM registry-cbu.huawei.com/modelarts-images-manager/cache/euleros_arm:2.8.3
USER root
RUN default_user=$(getent passwd 1000 | awk -F ':' '{print $1}') || echo "uid: 1000 does not exist" && \
default_group=$(getent group 100 | awk -F ':' '{print $1}') || echo "gid: 100 does not exist" && \
if [ ! -z ${default_user} ] && [ ${default_user} != "ma-user" ]; then \
userdel -r ${default_user}; \
fi && \
if [ ! -z ${default_group} ] && [ ${default_group} != "ma-group" ]; then \
groupdel -f ${default_group}; \
fi && \
groupadd -g 100 ma-group && useradd -d /home/ma-user -m -u 1000 -g 100 -s /bin/bash ma-user && \
chmod -R 750 /home/ma-user
COPY Ascend-cann-toolkit_7.0.0_linux-aarch64.run /root
COPY Ascend-hdk-*-npu-driver_23.0.rc2.2_linux-aarch64.run /rootCOPY Miniforge3-Linux-aarch64.sh /root
COPY requirements.txt /root
USER root
RUN cd /root && \
chmod +x A*.run && \
./Ascend-hdk-*-npu-driver_23.0.rc2.2_linux-aarch64.run --quiet --docker && \
./Ascend-cann-toolkit_7.0.0_linux-aarch64.run --quiet --full && \
chmod 777 Miniforge3-Linux-aarch64.sh && \
mv Miniforge3-Linux-aarch64.sh /home/ma-user && \
chmod 777 requirements.txt && \
mv requirements.txt /home/ma-user && \
rm -rf A*.run && \
rm -rf /tmp/*
ENV LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/hdf5/serial:/usr/local/Ascend/driver/lib64:/usr/local/Ascend/driver/lib64/common:/usr/local/Ascend/driver/lib64/driver:/usr/local/Ascend/ascend-toolkit/latest/lib64:/usr/local/Ascend/ascend-toolkit/latest/compiler/lib64/plugin/opskernel:/usr/local/Ascend/ascend-toolkit/latest/compiler/lib64/plugin/nnengine:$LD_LIBRARY_PATH \
PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages:/usr/local/Ascend/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe:$PYTHONPATH \
PATH=/usr/local/Ascend/ascend-toolkit/latest/bin:/usr/local/Ascend/ascend-toolkit/latest/compiler/ccec_compiler/bin:$PATH \
ASCEND_AICPU_PATH=/usr/local/Ascend/ascend-toolkit/latest \
ASCEND_OPP_PATH=/usr/local/Ascend/ascend-toolkit/latest/opp \
TOOLCHAIN_HOME=/usr/local/Ascend/ascend-toolkit/latest/toolkit \
ASCEND_AUTOML_PATH=/usr/local/Ascend/ascend-toolkit/latest/tools
ENV PYTHONPATH=/usr/local/Ascend/tfplugin/latest/python/site-packages:$PYTHONPATH
USER ma-user
RUN bash /home/ma-user/bind/Miniforge3-Linux-aarch64.sh -ub -p /home/ma-user/anaconda3 && \
source ~/.bashrc && \
. /home/ma-user/anaconda3/etc/profile.d/conda.sh && \
conda create -y --name MindSpore python=3.9 && \
conda activate MindSpore && \
pip --default-timeout=1000 install /usr/local/Ascend/ascend-toolkit/latest/fwkacllib/lib64/te-*-py3-none-any.whl && \
pip --default-timeout=1000 install /usr/local/Ascend/ascend-toolkit/latest/fwkacllib/lib64/hccl-*-py3-none-any.whl && \
pip --default-timeout=1000 install /usr/local/Ascend/ascend-toolkit/latest/tools/hccl_parser-*-py3-none-any.whl && \
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.2.10/MindSpore/unified/aarch64/mindspore-2.2.10-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple && \
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.2.10/MindSpore/lite/release/linux/aarch64/cloud_fusion/python39/mindspore_lite-2.2.10-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple && \
pip install -r requirements.txt
WORKDIR /home/ma-user
~~~
镜像地址
在其他AICC使用本镜像时,
1) 在本地arm宿主机通过docker pull 拉取上面镜像到本地(即执行docker pull remote_image_address)
2) 用docker tag 将局点信息和组织名替换成对应版本(即执行 docker tag local_image_address remote_image_address),
3) 用docker push 将修改后的镜像名称推送到局点的swr服务中(即执行docker push remote_image_address)
1) 在本地arm宿主机通过docker pull 拉取上面镜像到本地(即执行docker pull remote_image_address)
2) 用docker tag 将局点信息和组织名替换成对应版本(即执行 docker tag local_image_address remote_image_address),
3) 用docker push 将修改后的镜像名称推送到局点的swr服务中(即执行docker push remote_image_address)
swr.cn-central-221.ovaijisuan.com/dxy/mindspore_kernels:MindSpore2.2.10-cann7.0.0beta1_py_3.9-euler_2.8.3-32GB
评论
若您有任何疑虑,您可以在这里反馈您的建议。
发布
用户44847838
如何下载当前镜像
2024-07-14 15:57
发布