Issues with onnxruntime on Ubuntu 16.04

笑着哭i 提交于 2021-01-29 16:57:05

问题


I'm trying to run inference on an ONNX model on Ubuntu 16.04 using onnxruntime. But the import statement gives me this error:

>>> import onnxruntime
/opt/conda/lib/python3.6/site-packages/onnxruntime/capi/_pybind_state.py:13: UserWarning: Cannot load onnxruntime.capi. Error: '/opt/conda/lib/python3.6/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-36m-x86_64-linux-gnu.so: cannot enable executable stack as shared object requires: Permission denied'
  warnings.warn("Cannot load onnxruntime.capi. Error: '{0}'".format(str(e)))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.6/site-packages/onnxruntime/__init__.py", line 12, in <module>
    from onnxruntime.capi._pybind_state import get_all_providers, get_available_providers, get_device, set_seed, RunOptions, SessionOptions, set_default_logger_severity, NodeArg, ModelMetadata, GraphOptimizationLevel, ExecutionMode, OrtDevice, SessionIOBinding
ImportError: cannot import name 'get_all_providers'

After searching online, I have tried using execstack -c on the .so mentioned in the warning. But I get this message and the issue still persists:

section file offsets not monotonically increasing

I would really appreciate some pointers to fix this.

P.S. I even tried installing onnxruntime-gpu (I have CUDA 10.0) but I get the same error.


回答1:


Not sure if you've SELinux installed? https://ceisoftware.zendesk.com/hc/en-us/articles/202370087-Cannot-enable-executable-stack-as-shared-object-requires-Permission-denied. This doesn't seem to



来源:https://stackoverflow.com/questions/62607359/issues-with-onnxruntime-on-ubuntu-16-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!