open-mmlab / mmdeploy

OpenMMLab Model Deployment Framework
https://mmdeploy.readthedocs.io/en/latest/
Apache License 2.0
2.79k stars 637 forks source link

convert pytorch to openvino—ImportError: libcudart.so.11.0: cannot open shared object file #2666

Open BingoZZBZZ opened 10 months ago

BingoZZBZZ commented 10 months ago

Checklist

Describe the bug

02/02 15:24:37 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess

Process Process-2:

Traceback (most recent call last):

File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap

self.run()

File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/multiprocessing/process.py", line 108, in run

self._target(*self._args, **self._kwargs)

File "/home/zhengzb/mmdeploy/mmdeploy/apis/core/pipeline_manager.py", line 107, in call

ret = func(*args, **kwargs)

File "/home/zhengzb/mmdeploy/mmdeploy/apis/pytorch2onnx.py", line 61, in torch2onnx

task_processor = build_task_processor(model_cfg, deploy_cfg, device)

File "/home/zhengzb/mmdeploy/mmdeploy/apis/utils/utils.py", line 46, in build_task_processor

import_codebase(codebase_type, custom_module_list)

File "/home/zhengzb/mmdeploy/mmdeploy/codebase/init.py", line 37, in import_codebase

codebase.register_all_modules()

File "/home/zhengzb/mmdeploy/mmdeploy/codebase/mmpose/deploy/pose_detection.py", line 134, in register_all_modules

cls.register_deploy_modules()

File "/home/zhengzb/mmdeploy/mmdeploy/codebase/mmpose/deploy/pose_detection.py", line 124, in register_deploy_modules

import mmdeploy.codebase.mmdet.models

File "/home/zhengzb/mmdeploy/mmdeploy/codebase/mmdet/models/init.py", line 3, in

from . import dense_heads  # noqa: F401,F403

File "/home/zhengzb/mmdeploy/mmdeploy/codebase/mmdet/models/dense_heads/init.py", line 2, in

from . import base_dense_head  # noqa: F401,F403

File "/home/zhengzb/mmdeploy/mmdeploy/codebase/mmdet/models/dense_heads/base_dense_head.py", line 5, in

from mmdet.models.dense_heads import PAAHead

File "/home/zhengzb/mmdetection/mmdet/models/init.py", line 2, in

from .backbones import *  # noqa: F401,F403

File "/home/zhengzb/mmdetection/mmdet/models/backbones/init.py", line 2, in

from .csp_darknet import CSPDarknet

File "/home/zhengzb/mmdetection/mmdet/models/backbones/csp_darknet.py", line 11, in

from ..layers import CSPLayer

File "/home/zhengzb/mmdetection/mmdet/models/layers/init.py", line 3, in

from .bbox_nms import fast_nms, multiclass_nms

File "/home/zhengzb/mmdetection/mmdet/models/layers/bbox_nms.py", line 5, in

from mmcv.ops.nms import batched_nms

File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/site-packages/mmcv/ops/init.py", line 3, in

from .active_rotated_filter import active_rotated_filter

File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in

ext_module = ext_loader.load_ext(

File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext

ext = importlib.import_module('mmcv.' + name)

File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/importlib/init.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

ImportError: libcudart.so.11.0: cannot open shared object file: No such file or directory

02/02 15:24:38 - mmengine - ERROR - /home/zhengzb/mmdeploy/mmdeploy/apis/core/pipeline_manager.py - pop_mp_output - 80 - mmdeploy.apis.pytorch2onnx.torch2onnx with Call id: 0 failed. exit.

Reproduction

(mmdeploy) zhengzb@zhengzb:~/mmdeploy$ python tools/deploy.py configs/mmpose/pose-detection_openvino_static-256x192.py ../mmpose/checkpoint/rtmpose/rtmpose-s-triangle.py ../mmpose/checkpoint/rtmpose/epoch_300.pth ../mmdetection/checkpoint/faster_rcnn/whiteboard.jpg --test-img ../mmdetection/checkpoint/faster_rcnn/whiteboard.jpg --work-dir ../mmdetection/checkpoint/rtmpose/192 --device cpu --log-level INFO

Environment

02/02 15:45:50 - mmengine - INFO - 

02/02 15:45:50 - mmengine - INFO - **********Environmental information**********

Traceback (most recent call last):

  File "tools/check_env.py", line 41, in <module>

    for name, val in collect_env().items():

  File "tools/check_env.py", line 12, in collect_env

    env_info = collect_base_env()

  File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/site-packages/mmcv/utils/env.py", line 72, in collect_env

    from mmcv.ops import get_compiler_version, get_compiling_cuda_version

  File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/site-packages/mmcv/ops/__init__.py", line 3, in <module>

    from .active_rotated_filter import active_rotated_filter

  File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in <module>

    ext_module = ext_loader.load_ext(

  File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext

    ext = importlib.import_module('mmcv.' + name)

  File "/home/zhengzb/download/yes/envs/mmdeploy/lib/python3.8/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

ImportError: libcudart.so.11.0: cannot open shared object file: No such file or directory

Error traceback

No response

zhouyizhuo commented 7 months ago

ImportError: libcudart.so.11.0: cannot open shared object file: No such file or directory

how to solve?