官方文档
模型:
飞桨PaddlePaddle-源于产业实践的开源深度学习平台
安装参考(但目前官方已更新至2.6.1,本文没有测试该版本与paddlehub的兼容性):
环境配置
添加清华源进行下载,我的虚拟环境CUDA版本为11.8
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple paddlepaddle-gpu==2.4.2 paddle-bfloat==0.1.7 paddle2onnx==1.0.6 paddlefsl==1.1.0 paddlehub==2.3.1 paddlenlp==2.5.2
下载模型
hub install u2_conformer_wenetspeech
解决报错:
ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory
这个错误是找不到CUDA10.2,首先确定是没有该文件,还是系统路径的问题,没有的话在虚拟环境进行安装即可。
回到根目录,使用find命令进行搜索
find . -name "libcudart.so.10.2"
可以看到是有这个文件的
添加系统路径,这里需要对你自己的路径进行更改:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/anaconda3/envs/paddlehub/lib
ImportError: cannot import name 'check_argument_types' from 'typeguard' (/home/ai1/anaconda3/envs/paddlehub/lib/python3.9/site-packages/typeguard/__init__.py)
这个是typeguard的版本问题:
pip uninstall typeguard
pip install typeguard==2.13.3
参考文章:
ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory-CSDN博客
ImportError: cannot import name ‘check_argument_types‘ from ‘typeguard’_typeguard版本-CSDN博客