Deleting a branch is permanent. It CANNOT be undone. Continue?
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》
问题描述
在调试任务中使用pip install -r requirements.txt会找不到so文件,但是单独一条一条安装requirements的python依赖包就可以
相关环境(GPU/NPU)
NPU
相关集群(启智/智算)
启智
任务类型(调试/训练/推理)
调试
任务名
lixia202305082048355
lixia202305251082153
lixia202305081635747
日志说明或问题截图
(MindSpore) [ma-user mindyolo-master]$python test.py --config ./configs/yolox/yolox-nano.yaml --weight ./ckpt/yolox-n_300e_map241-ec9815e3.ckpt
Traceback (most recent call last):
File "test.py", line 12, in
import mindspore as ms
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/init.py", line 19, in
from mindspore import common, dataset, mindrecord, train, log
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/mindrecord/init.py", line 30, in
from .tools.cifar10_to_mr import Cifar10ToMR
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/mindrecord/tools/cifar10_to_mr.py", line 30, in
cv_import = import_module("cv2")
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
[ERROR] PIPELINE(12092,ffffbb00ba40,python):2023-05-25-10:29:30.989.108 [mindspore/ccsrc/pipeline/jit/init.cc:434] operator()] Failed to parse profiler data.ImportError: libGL.so.1: cannot open shared object file: No such file or directory
At:
/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/importlib/init.py(127): import_module
/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/mindrecord/tools/cifar10_to_mr.py(32):
(219): _call_with_frames_removed
(728): exec_module
(677): _load_unlocked
(967): _find_and_load_unlocked
(983): _find_and_load
/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/mindrecord/init.py(30):
(219): _call_with_frames_removed
(728): exec_module
(677): _load_unlocked
(967): _find_and_load_unlocked
(983): _find_and_load
(219): _call_with_frames_removed
(1043): _handle_fromlist
/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/init.py(19):
(219): _call_with_frames_removed
(728): exec_module
(677): _load_unlocked
(967): _find_and_load_unlocked
(983): _find_and_load
(219): _call_with_frames_removed
(953): _find_and_load_unlocked
(983): _find_and_load
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/init.py", line 19, in
from mindspore import common, dataset, mindrecord, train, log
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/mindrecord/init.py", line 30, in
from .tools.cifar10_to_mr import Cifar10ToMR
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/mindrecord/tools/cifar10_to_mr.py", line 30, in
cv_import = import_module("cv2")
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
期望的解决方案或建议
可以使用pip install -r requirements.txt的方式安装依赖
启智npu的notebook是支持使用pip install -r requirements.txt的方式安装依赖支持的,对于你提供的仓库,需要安装的requirements.txt,在MindSpore2.0.0a0_cann_6.0.rc1.alpha005镜像下可以安装使用:
请问启智npu的notebook MindSpore1.8、1.9环境无法使用pip install -r requirements.txt的方式安装依赖吗?
我使用1.8镜像,通过pip install -r requirements.txt的方式安装依赖并不会显示报错,但是运行程序的话会报找不到so文件的错误,但是把requirements里的依赖逐条使用pip install安装就可以正常运行程序
这种情况建议在调试环境调试好代码后,转移代码到训练环境进行训练。
请问如何将调试环境调试好的代码转移到训练环境呀
示例代码的readme有写的,可以去参考以下
此issue将关闭,有问题请重提issue