I am encountering an issue when running my DeepStream pipeline after converting it into a standalone package using PyInstaller . The error occurs when the nvinfer
plugin tries to load a custom YOLO inference library:
../nvdsinfer/nvdsinfer_func_utils.cpp:31 Could not open lib: /libnvdsinfer_custom_impl_Yolo.so,
error string: libnvinfer.so.8: cannot open shared object file: No such file or directory
Context:
- The DeepStream application works perfectly when run directly from the source code.
- After packaging the application with PyInstaller, the above error appears.
- The custom implementation file
libnvdsinfer_custom_impl_Yolo.so
is already included in the package directory (DeepStream-Yolo
).
PyInstaller Configuration:
Here’s a snippet of the relevant PyInstaller configuration:
datas=[
("processor/video/DeepStream-Yolo", "DeepStream-Yolo"),
],
hiddenimports=["passlib.handlers.bcrypt"],
The custom YOLO library file (libnvdsinfer_custom_impl_Yolo.so
) exists in the correct packaged path but seems to fail due to missing dependencies like libnvinfer.so.8
.
What I’ve Tried:
- Verified that the library
libnvdsinfer_custom_impl_Yolo.so
exists in the correct path within the PyInstaller package. - Ensured that TensorRT libraries are installed and properly linked on the system (
libnvinfer.so.8
). - Tested with
LD_LIBRARY_PATH
to point explicitly to TensorRT libraries during runtime, but no success.