Open JinqingZhengTju opened 1 year ago
Hello,
Try to set ONNXRUNTIME_DIR
with the location where you have installed the onnx-runtime changing the following lines.
export ONNXRUNTIME_DIR="path to onnx-runtime"
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
That solved the problem for me last time.
Hello,
Try to set
ONNXRUNTIME_DIR
with the location where you have installed the onnx-runtime changing the following lines.export ONNXRUNTIME_DIR="path to onnx-runtime" export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
That solved the problem for me last time.
I have set the environment path for onnxruntime as same as your advice. But it also reports this error, I don't know the reason.
Hello, Try to set
ONNXRUNTIME_DIR
with the location where you have installed the onnx-runtime changing the following lines.export ONNXRUNTIME_DIR="path to onnx-runtime" export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
That solved the problem for me last time.
I have set the environment path for onnxruntime as same as your advice. But it also reports this error, I don't know the reason.
Is this issue solved? If not, would you please attach a screenshot of your echo $LD_LIBRARY_PATH
?
Hello, Try to set
ONNXRUNTIME_DIR
with the location where you have installed the onnx-runtime changing the following lines.export ONNXRUNTIME_DIR="path to onnx-runtime" export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
That solved the problem for me last time.
I have set the environment path for onnxruntime as same as your advice. But it also reports this error, I don't know the reason.
Is this issue solved? If not, would you please attach a screenshot of your
echo $LD_LIBRARY_PATH
?
I have solved this issue by setting the environment path in Pycharm. This is a way to solve this kind of problem. I don't know why the environment path setting in ~./bashrc doesn't work.
Hello, Try to set
ONNXRUNTIME_DIR
with the location where you have installed the onnx-runtime changing the following lines.export ONNXRUNTIME_DIR="path to onnx-runtime" export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
That solved the problem for me last time.
I have set the environment path for onnxruntime as same as your advice. But it also reports this error, I don't know the reason.
Is this issue solved? If not, would you please attach a screenshot of your
echo $LD_LIBRARY_PATH
?I have solved this issue by setting the environment path in Pycharm. This is a way to solve this kind of problem. I don't know why the environment path setting in ~./bashrc doesn't work.
Glad to hear that! BTW, have you done source ~/.bashrc
after you set the path in ~/.bashrc ???
Hello, Try to set
ONNXRUNTIME_DIR
with the location where you have installed the onnx-runtime changing the following lines.export ONNXRUNTIME_DIR="path to onnx-runtime" export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
That solved the problem for me last time.
I have set the environment path for onnxruntime as same as your advice. But it also reports this error, I don't know the reason.
Is this issue solved? If not, would you please attach a screenshot of your
echo $LD_LIBRARY_PATH
?I have solved this issue by setting the environment path in Pycharm. This is a way to solve this kind of problem. I don't know why the environment path setting in ~./bashrc doesn't work.
Glad to hear that! BTW, have you done
source ~/.bashrc
after you set the path in ~/.bashrc ???
Yes, I have run this command. But it still doesn't work. I have to set it in Pycharm.
If you echo $LD_LIBRARY_PATH
in another shell, what will print?
Have you tried to reopen PyCharm?
Hello,
Try to set
ONNXRUNTIME_DIR
with the location where you have installed the onnx-runtime changing the following lines.export ONNXRUNTIME_DIR="path to onnx-runtime" export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
That solved the problem for me last time.
where do you put the library onnx-runetime?
Checklist
Describe the bug
When I run inference_model with .onnx file, there is a error as follows: File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/apis/inference.py", line 169, in inference_model model = task_processor.init_backend_model(backend_files) File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/codebase/mmrotate/deploy/rotated_detection.py", line 101, in init_backend_model model_files, self.model_cfg, self.deploy_cfg, device=self.device) File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/codebase/mmrotate/deploy/rotated_detection_model.py", line 264, in build_rotated_detection_model kwargs) File "/home/zjq/anaconda3/envs/svd/lib/python3.7/site-packages/mmcv/utils/registry.py", line 237, in build return self.build_func(*args, *kwargs, registry=self) File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/codebase/mmrotate/deploy/rotated_detection_model.py", line 18, in __build_backend_model return registry.module_dict[cls_name](args, kwargs) File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/codebase/mmrotate/deploy/rotated_detection_model.py", line 57, in init backend=backend, backend_files=backend_files, device=device) File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/codebase/mmrotate/deploy/rotated_detection_model.py", line 76, in _init_wrapper deploy_cfg=self.deploy_cfg) File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/codebase/base/backend_model.py", line 63, in _build_wrapper output_names=output_names) File "/media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/backend/onnxruntime/wrapper.py", line 46, in init session_options.register_custom_ops_library(ort_custom_op_path) onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Failed to load library /media/zjq/Data/Ubuntu_Project/svd/MMDeploy/mmdeploy/lib/libmmdeploy_onnxruntime_ops.so with error: libonnxruntime.so.1.11.1: cannot open shared object file: No such file or directory
Reproduction
I run this code: model_output = inference_model(model_cfg, deploy_cfg, backend_files, img, device) with the configs: oriented_rcnn_r50_fpn_3x_dota_le90.py rotated-detection_onnxruntime_dynamic.py oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.onnx
Environment
Error traceback
No response