飞桨安装手册
安装PaddlePaddle。
该命令会自动安装飞桨主框架每日自动构建的nightly-build版本:
python -m pip install paddlepaddle --pre -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
安装CustomDevice。
该命令会自动安装飞桨Custom Device每日自动构建的nightly-build版本:
python -m pip install --pre paddle-custom-mlu -i https://www.paddlepaddle.org.cn/packages/nightly/mlu/
安装python10版本
先到这里看https://www.paddlepaddle.org.cn/packages/nightly/mlu/paddle-custom-mlu/ ,发现是python10,下载该版本的miniconda:
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py310_24.4.0-0-Linux-x86_64.sh
安装python10
执行:
sh Miniconda3-py310_24.4.0-0-Linux-x86_64.sh
分别输入 回车 q yes 回车,最后默认的no改成yes
安装好后激活环境
source miniconda3/bin/activate
安装飞桨寒武纪版本
python -m pip install paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
python -m pip install --pre paddle-custom-mlu -i https://www.paddlepaddle.org.cn/packages/nightly/mlu/
测试
ls
miniconda3 tmp
root@a32d31a91e184cfcba97a0dbb89359f8-task0-0:~# source miniconda3/bin/activate
(base) root@a32d31a91e184cfcba97a0dbb89359f8-task0-0:~# python3
Python 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle
I0608 17:25:50.029543 284 init.cc:236] ENV [CUSTOM_DEVICE_ROOT]=/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device
I0608 17:25:50.029579 284 init.cc:145] Try loading custom device libs from: [/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/miniconda3/lib/python3.10/site-packages/paddle/__init__.py", line 37, in <module>
from .base import core # noqa: F401
File "/root/miniconda3/lib/python3.10/site-packages/paddle/base/__init__.py", line 207, in <module>
__bootstrap__()
File "/root/miniconda3/lib/python3.10/site-packages/paddle/base/__init__.py", line 199, in __bootstrap__
core.init_devices()
ValueError: (InvalidArgument) Fail to open library: /root/miniconda3/lib/python3.10/site-packages/paddle_custom_device/libpaddle-custom-mlu.so with error: libmluops.so.1: cannot open shared object file: No such file or directory
[Hint: dso_handle should not be null.] (at /paddle/paddle/fluid/platform/init.cc:152)
安装失败...