安装华为软件昇腾mindspore-gpu-1.9.0失败记录
官网安装地址:
https://www.mindspore.cn/install
PS: 不得不说华为的软件是愈发的不好用了,这个mindspore老版本去年我是使用过的,安装也是比较方便的,搞不清这优化来优化去咋变的这么不好安装了呢。

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

官网给出的安装命令:
运行测试代码:
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识别不到环境中的cuda和cudnn。
这其实就是一个十分奇葩的报错,明明使用conda安装了,cuda和cudnn都应该是conda按照依赖关系安装的,如果使用conda安装不安装依赖的cuda和cudnn环境那么和pip安装方式又有什么区别呢。
看了下官方在conda方式下面给的具体说明:

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

执行官方给出的自动安装cuda和cudnn脚本:
 
安装失败:(这个自动安装脚本失败或许是我的操作系统问题,因为这个系统是deepin系统)

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

运行镜像:

报错信息显示nvidia驱动版本不匹配。
============================================================
也就是说,在nvidia显卡驱动安装成功的前提下,如果不手动安装cuda和cudnn,那么使用pip,conda,docker方式都是无法成功安装mindspore的GPU版本的,这个结果确实要人不好接受。
============================================================
 
posted on 2022-12-10 11:52 Angry_Panda 阅读(1383) 评论(0) 收藏 举报
 
                    
                     
                    
                 
                    
                
 
                
            
         
         
 浙公网安备 33010602011771号
浙公网安备 33010602011771号