安装步骤
1从git上获取相关文件
cuda10以下选择
git clone https://github.com/torch/distro.git ~/torch --recursive
cuda10以上选择
git clone https://github.com/nagadomi/distro ~/torch --recursive
||如果出错
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
可以输入
git config --global http.postBuffer 2000000000
删除刚刚克隆的torch文件夹,重新克隆。
如果问题还没解决,建议删除torch文件夹,多试几次。
2进入torch安装相关依赖
cd torch
bash install-deps
3install
./install.sh
出现选择(yes/no)
输入yes
4添加环境变量
source ~/.bashrc
||如果出现找不到source的提示,将语句换成sudo -s source ~/.bashrc
5测试
输入th
大功告成!
附:出现NOTFOUND CUDA_cublas_device_LIBRARY的解决办法
1)按照第一步说的,根据cuda版本选择对应的语句。
2)保证cmake是最新版本。参考https://blog.csdn.net/qq_15211883/article/details/85122976
本文参考
https://blog.csdn.net/jacke121/article/details/79616554
https://blog.csdn.net/qq_32846595/article/details/103342640
https://blog.csdn.net/qq_15211883/article/details/85122976