0
点赞
收藏
分享

微信扫一扫

安装华为软件昇腾mindspore-gpu-1.9.0失败记录

janedaring 2022-12-20 阅读 212

官网安装地址:

​​https://www.mindspore.cn/install​​

 

 

PS: 不得不说华为的软件是愈发的不好用了,这个mindspore老版本去年我是使用过的,安装也是比较方便的,搞不清这优化来优化去咋变的这么不好安装了呢。

 

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_CUDA

 

 

 

 

====================================

 

 

1. 首先选择使用conda方式安装:

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_bc_02

 

 

 

 

 

官网给出的安装命令:

conda install mindspore-gpu=1.9.0 cudatoolkit=11.1 -c mindspore -c conda-forge

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_杂谈_03

 

 

 

运行测试代码:

python -c "import mindspore;mindspore.run_check()"

 

报错:

[ERROR] ME(74920:140607147143488,MainProcess):2022-12-10-11:48:19.825.553 [mindspore/run_check/_check_version.py:194] Cuda ['10.1', '11.1', '11.6'] version(libcu*.so need by mindspore-gpu) is not found, please confirm that the path of cuda is set to the env LD_LIBRARY_PATH, or check whether the CUDA version in wheel package and the CUDA runtime in current device matches, please refer to the installation guidelines: https://www.mindspore.cn/install
[ERROR] ME(74920:140607147143488,MainProcess):2022-12-10-11:48:19.825.657 [mindspore/run_check/_check_version.py:194] Cuda ['10.1', '11.1', '11.6'] version(libcu*.so need by mindspore-gpu) is not found, please confirm that the path of cuda is set to the env LD_LIBRARY_PATH, or check whether the CUDA version in wheel package and the CUDA runtime in current device matches, please refer to the installation guidelines: https://www.mindspore.cn/install
[ERROR] ME(74920:140607147143488,MainProcess):2022-12-10-11:48:19.830.949 [mindspore/run_check/_check_version.py:194] Cuda ['10.1', '11.1', '11.6'] version(libcudnn*.so need by mindspore-gpu) is not found, please confirm that the path of cuda is set to the env LD_LIBRARY_PATH, or check whether the CUDA version in wheel package and the CUDA runtime in current device matches, please refer to the installation guidelines: https://www.mindspore.cn/install
[ERROR] ME(74920:140607147143488,MainProcess):2022-12-10-11:48:19.831.029 [mindspore/run_check/_check_version.py:194] Cuda ['10.1', '11.1', '11.6'] version(libcudnn*.so need by mindspore-gpu) is not found, please confirm that the path of cuda is set to the env LD_LIBRARY_PATH, or check whether the CUDA version in wheel package and the CUDA runtime in current device matches, please refer to the installation guidelines: https://www.mindspore.cn/install
[ERROR] ME(74920,7fe1a70ef140,python):2022-12-10-11:48:19.881.793 [mindspore/ccsrc/runtime/hardware/device_context_manager.cc:46] LoadDynamicLib] Load dynamic library libmindspore_gpu failed, returns [libcudnn.so.8: cannot open shared object file: No such file or directory].
MindSpore version: 1.9.0
MindSpore running check failed.
Create device context failed, please make sure target device:GPU is available.

----------------------------------------------------
- C++ Call Stack: (For framework developers)
----------------------------------------------------
mindspore/ccsrc/runtime/hardware/device_context_manager.cc:208 GetOrCreateDeviceContext

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_杂谈_04

 

解释一下这个报错信息,说的就是mindspore-gpu识别不到环境中的cuda和cudnn。

 

这其实就是一个十分奇葩的报错,明明使用conda安装了,cuda和cudnn都应该是conda按照依赖关系安装的,如果使用conda安装不安装依赖的cuda和cudnn环境那么和pip安装方式又有什么区别呢。

看了下官方在conda方式下面给的具体说明:

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_Cuda_05

 

 

 

 

也就是说官方虽然提供了conda的安装方式,但是实际上和pip安装方式是一样的,只不过下载源的地址不同,这着实雷到我了。

 

同时官方还提供了自动安装cuda和cudnn的脚本:

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_Cuda_06

 

 

 

 

执行官方给出的自动安装cuda和cudnn脚本:

 

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_bc_07

 

 

安装失败:(这个自动安装脚本失败或许是我的操作系统问题,因为这个系统是deepin系统)

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_CUDA_08

 

 

 

 

==============================================

 

 

2. docker安装方式

既然pip和conda安装方式都需要自己额外安装cuda和cudnn,那么使用docker安装方式就应该可以避免这个问题了,于是使用docker安装:

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_杂谈_09

 

 

 

运行镜像:

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_CUDA_10

 

 

报错信息显示nvidia驱动版本不匹配。

 

 

 

 

 

============================================================

 

 

也就是说,在nvidia显卡驱动安装成功的前提下,如果不手动安装cuda和cudnn,那么使用pip,conda,docker方式都是无法成功安装mindspore的GPU版本的,这个结果确实要人不好接受。

 

 

 

============================================================

 

 

 

 真的是太气人了,这安装的便捷性和pytorch根本没法比,也是没谁了,最后还是手动安装cuda和cudnn,然后成功安装mindspore-gpu-1.9.0:

 

安装华为软件昇腾mindspore-gpu-1.9.0失败记录_Cuda_11

 

 

 

 

 

 

 

 

 

举报

相关推荐

0 条评论