Sign inSign up

ascendai/mindspore

By ascendai

•Updated 7 days ago

Image
0

10K+

ascendai/mindspore repository overview

⁠MindSpore

⁠Quick Reference

⁠MindSpore

MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios. MindSpore is designed to provide development experience with friendly design and efficient execution for the data scientists and algorithmic engineers, native support for Atlas AI processor, and software hardware co-optimization. At the meantime MindSpore as a global AI open source community, aims to further advance the development and enrichment of the AI software/hardware application ecosystem.

⁠Supported Tags and Dockerfile Usage

⁠Tag Specification

Tags follow this format:

<MindSpore Version>-<CANN Version>-<Hardware Info (Chip)>-<Operating System>-<Python Version>
FieldExample ValuesDescription
MindSpore Version2.10.0Corresponds to the version identifier in MindSpore official release tags
CANN Versioncann9.1.0Corresponds to the version identifier in Atlas official release tags
Hardware Info (Chip)see belowAtlas chip model identifier
Operating Systemubuntu22.04 / openeuler24.03Operating system distribution and version used in the base image
Python Versionpy3.12Major Python version built into the image

Tips: System architecture is automatically detected via Docker Manifest, no need to specify in the tag.

⁠Tag
  • 2.10.0-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.10.0-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.10.0-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.10.0-cann9.1.0-a3-openeuler24.03-py3.12

See dockerfile:dockerfile⁠

⁠Building Arguments
ParameterDescriptionRequiredSourceExample Values
CANN_VERSIONAtlas CANN toolkit versionYesCANN image tag9.1.0
CHIP_ARCHAtlas chip architecture identifierYesTag specificationsee below
OS_SYSTEMBase image operating system and versionYesTag specificationubuntu22.04 / openeuler24.03
PY_VERSIONPython version built into the base imageYesTag specificationpy3.12
MINDSPORE_VERSIONMindSpore version numberYesMindSpore repository releases⁠2.10.0
PIP_INDEX_URLpip installation source URL (default: Huawei Cloud mirror)NoPyPI mirror sourcehttps://mirrors.huaweicloud.com/repository/pypi/simple⁠
⁠Image Repository Address

MindSpore Atlas images are hosted on Huawei Cloud SWR image repository:

swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore

Full Image Example:

swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore:2.10.0-cann9.1.0-910b-ubuntu22.04-py3.12

⁠Quick Start

⁠Building MindSpore Image

Taking the construction of the 2.10.0-cann9.1.0-910b-ubuntu22.04-py3.12 image as an example:

docker build \
    --build-arg CANN_VERSION=9.1.0 \
    --build-arg CHIP_ARCH=910b \
    --build-arg OS_SYSTEM=ubuntu22.04 \
    --build-arg PY_VERSION=py3.12 \
    --build-arg MINDSPORE_VERSION=2.10.0 \
    --build-arg PIP_INDEX_URL=https://mirrors.huaweicloud.com/repository/pypi/simple \
    -t mindspore:2.10.0-cann9.1.0-910b-ubuntu22.04-py3.12 \
    -f Dockerfile .
⁠Running MindSpore Container
docker run \
    --privileged \
    --name mindspore_container \
    --device /dev/davinci1 \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -it mindspore:{tag} bash

Where:

  • {tag} is the tag specified during the MindSpore image build, for example, mindspore:2.10.0-cann9.1.0-910b-ubuntu22.04-py3.12.
⁠How to Extend for Custom Development
# Use MindSpore image as base image, add user software
FROM swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore:2.10.0-cann9.1.0-910b-ubuntu22.04-py3.12

RUN apt update -y && \
    apt install -y gcc g++

# Install additional dependencies
RUN pip install pandas scikit-learn

# Copy user code
WORKDIR /workspace
COPY . /workspace

CMD ["python", "train.py"]

⁠Supported Hardware

Chip SeriesProduct ExamplesArchitecture
Atlas A2Atlas 800T A2, Atlas 900 A2 PoDAuto-detected (ARM64/x86_64)
Atlas A3Atlas 800T A3Auto-detected (ARM64/x86_64)

Tips: Use the docker manifest inspect command to view the system architectures supported by an image.

⁠License

View the license information⁠ for MindSpore included in these images.

As with all container images, pre-installed software packages (Python, system libraries, etc.) may be subject to their respective licenses.

⁠Image Usage Responsibility

The released Atlas software images are community versions, not intended for commercial use, and serve only as references for production practices.

Tag summary

Content type

Image

Digest

sha256:81f8dee89…

Size

5 GB

Last updated

7 days ago

docker pull ascendai/mindspore:2.9.0-a3-openeuler24.03-py3.11