昇腾社区首页
中文
注册

安装依赖

安装前必读

  • 请提前安装Python并配置好pip源,具体可参考编译安装Python章节。
  • 建议执行命令pip3 install --upgrade pip进行升级(pip版本需 ≥ 24.0),避免因pip版本过低导致安装失败。

依赖列表

MindIE所需依赖如表1所示。

针对用户自行安装的开源软件,请使用稳定版本(尽量使用无漏洞的版本)。

表1 依赖列表

软件

版本要求

变更记录

glibc

>=2.34,请用户自行安装。

Mind 1.0版本新增

gcc、g++

>=11.4.0,请用户自行安装。

Mind 1.0版本新增

Python

3.10.x、3.11.x,若版本不满足则参见编译安装Python进行安装。

Mind 1.0版本新增

gevent

22.10.2

Mind 1.0版本新增

python-rapidjson

>=1.6

Mind 1.0版本新增

geventhttpclient

2.0.11

Mind 1.0版本新增

urllib3

2.1.0

Mind 1.0版本新增

greenlet

3.0.3

Mind 1.0版本新增

zope.event

5.0

Mind 1.0版本新增

zope.interface

6.1

Mind 1.0版本新增

prettytable

3.5.0

Mind 1.0版本新增

jsonschema

4.21.1

Mind 1.0版本新增

jsonlines

4.0.0

Mind 1.0版本新增

thefuzz

0.22.1

Mind 1.0版本新增

pyarrow

>=15.0.0

Mind 1.0版本新增

pydantic

2.6.3

Mind 1.0版本新增

sacrebleu

2.4.2

Mind 1.0版本新增

rouge_score

0.1.2

Mind 1.0版本新增

pillow

10.3.0

Mind 1.0版本新增

requests

2.31.0

Mind 1.0版本新增

matplotlib

>=1.3.0

Mind 1.0版本新增

text_generation

0.7.0

Mind 1.0版本新增

numpy

1.26.3

Mind 1.0版本新增

pandas

2.1.4

Mind 1.0版本新增

transformers

4.44.0,请用户根据模型选择对应版本。

Mind 1.0版本新增

tritonclient[all]

-

Mind 1.0版本新增

colossalai

0.4.0

Mind 1.0版本新增

numba

0.61.2

MindIE 2.0.RC1版本新增

  1. 请用户自行准备依赖安装文件requirements.txt,样例如下所示。
    gevent==22.10.2
    python-rapidjson>=1.6
    geventhttpclient==2.0.11
    urllib3>=2.1.0
    greenlet==3.0.3
    zope.event==5.0
    zope.interface==6.1
    prettytable~=3.5.0
    jsonschema~=4.21.1
    jsonlines~=4.0.0
    thefuzz~=0.22.1
    pyarrow~=15.0.0
    pydantic~=2.6.3
    sacrebleu~=2.4.2
    rouge_score~=0.1.2
    pillow~=10.3.0
    requests~=2.31.0
    matplotlib>=1.3.0
    text_generation~=0.7.0
    numpy~=1.26.3
    pandas~=2.1.4
    transformers~=4.44.0
    tritonclient[all]
    colossalai==0.4.0
    numba==0.61.2
  2. 执行以下命令进行安装。如下命令如果使用非root用户安装,需要在安装命令后加上--user,安装命令可在任意路径下执行。
     pip3 install -r requirements.txt