Hello,
I encountered an error when running these lines of code in my project:
with open(engine_file_path, "rb") as f, trt.Runtime(trt.Logger()) as runtime:
engine = runtime.deserialize_cuda_engine(f.read())
[TensorRT] ERROR: Cuda initialization failure with error 3. Please check cuda installation: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html.
ERROR - This exception occurred while initialing detector pipeline. Stopping
Traceback (most recent call last):
File ".../yolo_tensorrt/yolo_trt_detector.py", line 15, in __init__
self.engine = self.load_tensorrt_engine(checkpoint_path, self.TRT_LOGGER)
File ".../yolo_tensorrt/yolo_trt_detector.py", line 23, in load_tensorrt_engine
with open(engine_file_path, "rb") as f, trt.Runtime(trt.Logger()) as runtime:
TypeError: pybind11::init(): factory function returned nullptr
I am using this image: nvcr.io/nvidia/tensorrt:19.02-py3 ,
Ubuntu 16.04
Python 3.5
Cuda 10.0.130
Cudnn 7.4.2
Tensorrt 5.0.2
First running /opt/tensorrt/python/python_setup.sh, then running the script.
Also, when only running the code snippet above in the python console, I get no errors:
>>> type(engine)
<class 'tensorrt.tensorrt.ICudaEngine'>
Could you please explain the error code (error 3) and the error itself (pybind11::init(): factory function returned nullptr)?