Sign inSign up

ascendai/indexsdk

By ascendai

•Updated 6 days ago

Image
0

2.3K

ascendai/indexsdk repository overview

⁠Index SDK

⁠1.Quick Reference

⁠2.1 Tag Naming Convention

Tags follow this pattern:

<indexsdk_version>-<chip_series>-<os>-<python_version>
FieldExample ValuesDescription
indexsdk_version26.1.0IndexSDK version
chip_series950, 910b, a3, 310pTarget chip family
osubuntu22.04, openeuler24.03Base operating system
python_versionpy3.12Python version
⁠2.2 CANN 9.1.0 + 26.1.0 Index SDK Image
TagDockerfileImage Content
26.1.0-cann9.1.0-910b-ubuntu22.04-py3.12Dockerfile⁠toolkit + Index SDK
26.1.0-cann9.1.0-310p-ubuntu22.04-py3.12Dockerfile⁠toolkit + Index SDK
26.1.0-cann9.1.0-a3-ubuntu22.04-py3.12Dockerfile⁠toolkit + Index SDK
26.1.0-cann9.1.0-950-ubuntu22.04-py3.12Dockerfile⁠toolkit + Index SDK
26.1.0-cann9.1.0-910b-openeuler24.03-py3.12Dockerfile⁠toolkit + Index SDK
26.1.0-cann9.1.0-310p-openeuler24.03-py3.12Dockerfile⁠toolkit + Index SDK
26.1.0-cann9.1.0-a3-openeuler24.03-py3.12Dockerfile⁠toolkit + Index SDK
26.1.0-cann9.1.0-950-openeuler24.03-py3.12Dockerfile⁠toolkit + Index SDK

⁠3.Quick Start

⁠3.1 Prerequisites
⁠3.1.1 Install Driver
  • An Atlas NPU driver compatible with the container's CANN version must be installed on the host. See the CANN Compatibility Matrix⁠ for driver ↔ CANN version mapping.
  • Docker version requirement: Docker version should not be lower than 24.0.x.
⁠3.2 Running a Index Container
⁠Mount Devices Manually
  • Device Mounting: Map host device files to the container using the --device parameter to ensure the container can access specified hardware resources. /dev/davinci is the NPU accelerator card (mount as needed), while /dev/davinci_manager, /dev/devmm_svm, and /dev/hisi_hdc are NPU management devices (mount all).

  • Driver and Toolchain Mounting: Mount driver files and toolchain directories (such as /usr/local/Ascend/driver and /usr/local/bin/npu-smi) from the host to the container in read-only mode to ensure consistent runtime environment. In the example code below, /dev/davinci1 represents mounting device 1.

  • After -ti, specify the corresponding image tag, for example: -it swr.cn-south-1.myhuaweicloud.com/ascendhub/indexsdk:26.1.0-cann9.1.0-910b-ubuntu22.04-py3.12

docker run \
    --name index_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 atlas/index:tag bash
⁠3.3 Generate Operators
cd /usr/local/Ascend/mxIndex/ops
./custom_opp_*.run
cd ../tools
python3 aicpu_generate_model.py -t npu-type
python3 flat_generate_model.py -t npu-type -d 512
mv op_models/* $MX_INDEX_MODELPATH

For more details on operator generation, refer to: Operator Generation⁠

⁠3.4 Demo Testing

Demo Example⁠

⁠3.5 How to Build Locally
docker build -t {your_repo}/index:latest -f Dockerfile .

⁠4. License

View the license information⁠ for CANN and MindSeries software included in these images.

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

Tag summary

Content type

Image

Digest

sha256:0ae018282…

Size

4.3 GB

Last updated

6 days ago

docker pull ascendai/indexsdk:26.0.0-a3-openeuler24.03-py3.11