Add MACA AI Framework
parent
d88e1c6147
commit
49e88cbce1
133
MACA-AI-Framework.md
Normal file
133
MACA-AI-Framework.md
Normal file
@ -0,0 +1,133 @@
|
||||
# MACA AI Framework
|
||||
|
||||
### 环境准备
|
||||
|
||||
#### Python 环境
|
||||
|
||||
* 匹配目标安装包的 Python 版本
|
||||
|
||||
#### MXMACA 环境
|
||||
|
||||
* 安装 Driver 软件包以及 MXMACA SDK 软件包
|
||||
* 安装 MACA Pytorch (依赖Pytorch的框架)
|
||||
|
||||
#### cu-bridge 环境
|
||||
|
||||
* 在安装 MXMACA 环境到 `/opt/maca/` 目录后,将 cu-bridge解压到 `/opt/maca/tools/` 目录下,具体操作步骤参见相关文档。可以检验 `/opt/maca/tools/cu-bridge/bin/cucc` 文件是否存在,从而判断 cu-bridge 环境是否配置完成。
|
||||
|
||||
### Pip安装
|
||||
#### ONNXRuntime
|
||||
|
||||
##### 单包安装
|
||||
|
||||
* **使用以下命令安装指定包**
|
||||
|
||||
```shell
|
||||
pip install onnxruntime-gpu -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
|
||||
##### 使用requirements.txt批量安装
|
||||
|
||||
* **在命令行中指定 maca-pypi 源地址**
|
||||
|
||||
```shell
|
||||
pip install -r ./requirements.txt -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
```shell
|
||||
cat <<EOF> ./requirements.txt
|
||||
onnxruntime-gpu
|
||||
maca_precision
|
||||
maca_quantizer
|
||||
maca_converter
|
||||
EOF
|
||||
|
||||
```
|
||||
#### bitsandbytes
|
||||
|
||||
* **使用以下命令安装指定包**
|
||||
|
||||
```shell
|
||||
pip install bitsandbytes -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
|
||||
#### CV-CUDA
|
||||
|
||||
* **使用以下命令安装指定包**
|
||||
|
||||
```shell
|
||||
pip install cvcuda-cu11 -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
|
||||
#### DeepSpeed
|
||||
|
||||
##### 单包安装
|
||||
|
||||
* **使用以下命令安装指定包**
|
||||
|
||||
```shell
|
||||
pip install deepspeed -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
##### 使用requirements.txt批量安装
|
||||
|
||||
* **在命令行中指定 maca-pypi 源地址**
|
||||
|
||||
```shell
|
||||
pip install -r ./requirements.txt -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
|
||||
```shell
|
||||
cat <<EOF> ./requirements.txt
|
||||
deepspeed
|
||||
llamafactory
|
||||
liger-kernel
|
||||
EOF
|
||||
|
||||
```
|
||||
|
||||
#### MMCV
|
||||
|
||||
* **使用以下命令安装指定包**
|
||||
|
||||
```shell
|
||||
pip install mmcv -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
|
||||
#### PaddlePaddle
|
||||
|
||||
* **使用以下命令安装指定包**
|
||||
|
||||
```shell
|
||||
pip install paddlepaddle-gpu -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
|
||||
#### Tensorflow
|
||||
|
||||
* **使用以下命令安装指定包**
|
||||
|
||||
```shell
|
||||
pip install tensorflow -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
|
||||
|
||||
### 列出可用版本
|
||||
|
||||
* **对于 pip 22.0 及之前版本,使用以下命令触发错误并列出包的所有可用版本**
|
||||
|
||||
```shell
|
||||
pip install <package>== -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
|
||||
```
|
||||
* **对于 pip 22.0 之后版本,使用以下命令列出某个包的所有可用版本**
|
||||
|
||||
```shell
|
||||
pip index versions <package> -i https://repos.metax-tech.com/r/maca-pypi/simple --trusted-host repos.metax-tech.com
|
||||
```
|
||||
Loading…
Reference in New Issue
Block a user