Skip to content

[BUG] [Resolved] Docker image openmmlab/mmdeploy:ubuntu20.04-cuda11.3-mmdeploy1.2.0,Failed to load library libonnxruntime_providers_shared.so with error: libonnxruntime_providers_shared.so: cannot open shared object file: No such file or directory #2918

@llphunhun

Description

@llphunhun

Checklist

  • I have searched related issues but cannot get the expected help.
  • 2. I have read the FAQ documentation but cannot get the expected help.
  • 3. The bug has not been fixed in the latest version.

Describe the bug

In the official Docker image openmmlab/mmdeploy:ubuntu20.04-cuda11.3-mmdeploy1.2.0, a bug occurs when using GPU for ONNX model inference, prompting that libonnxruntime_providers_shared.so cannot be found, which causes problems in model loading. This issue has now been resolved. Since issue 2456 (#2456) did not provide a solution in the end, the solution is offered here.

Reproduction

[E:onnxruntime:, provider_bridge_ort.cc:901 Ensure] Failed to load library libonnxruntime_providers_shared.so with error: libonnxruntime_providers_shared.so: cannot open shared object file: No such file or directory
2025-09-06 00:43:29.207808824 [E:onnxruntime:, provider_bridge_ort.cc:901 Ensure] Failed to load library libonnxruntime_providers_shared.so with error: libonnxruntime_providers_shared.so: cannot open shared object file: No such file or directory
2025-09-06 00:43:29.207809112 [E:onnxruntime:, provider_bridge_ort.cc:901 Ensure] Failed to load library libonnxruntime_providers_shared.so with error: libonnxruntime_providers_shared.so: cannot open shared object file: No such file or directory
2025-09-06 00:43:29.207809385 [E:onnxruntime:, provider_bridge_ort.cc:901 Ensure] Failed to load library libonnxruntime_providers_shared.so with error: libonnxruntime_providers_shared.so: cannot open shared object file: No such file or directory
[2025-09-06 00:43:29.220] [mmdeploy] [error] [ort_net.cpp:205] unhandled exception when creating ORTNet: OrtSessionOptionsAppendExecutionProvider_Cuda: Failed to load shared library
[2025-09-06 00:43:29.220] [mmdeploy] [error] [net_module.cpp:54] Failed to create Net backend: onnxruntime, config: {
"context": {
"device": "",
"model": "",
"stream": ""
},

Environment

openmmlab/mmdeploy:ubuntu20.04-cuda11.3-mmdeploy1.2.0

Error traceback

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions