frigate: [Detector Support]: TensorRT libraries not found
Describe the problem you are having
i followed the instructions for getting everything setup for nvidia gpu detector (tensor). when i run the frigate docker container i get the error message: “TensorRT libraries not found, tensorrt detector not present”.
Version
0.12
Frigate config file
detectors:
tensorrt:
type: tensorrt
device: 0
model:
path: /trt-models/yolov7-tiny-416.trt
input_tensor: nchw
input_pixel_format: rgb
width: 416
height: 416
docker-compose file or Docker CLI command
docker run --rm --name frigate --privileged --shm-size=512m -v /dev/bus/usb:/dev/bus/usb -v /etc/localtime:/etc/localtime:ro -v /opt/frigate/config/config.yml:/config/config.yml:ro -v /opt/frigate/trt-models:/trt-models:ro -v /opt/frigate/media:/media/frigate:rw -e USE_FP16=False -p 5000:5000 -p 8554:8554 -p 8555:8555/tcp -p 8555:8555/udp -e FRIGATE_RTSP_PASSWORD='password' ghcr.io/blakeblackshear/frigate:0.12.0-beta10
Relevant log output
2023-03-22 22:09:51.449389085 [2023-03-22 22:09:51] frigate.app INFO : Output process started: 724
2023-03-22 22:09:51.449697586 Traceback (most recent call last):
2023-03-22 22:09:51.449712634 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2023-03-22 22:09:51.449714050 self.run()
2023-03-22 22:09:51.449715410 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2023-03-22 22:09:51.449716717 self._target(*self._args, **self._kwargs)
2023-03-22 22:09:51.449718065 File "/opt/frigate/frigate/object_detection.py", line 98, in run_detector
2023-03-22 22:09:51.449719421 object_detector = LocalObjectDetector(detector_config=detector_config)
2023-03-22 22:09:51.449724093 File "/opt/frigate/frigate/object_detection.py", line 52, in __init__
2023-03-22 22:09:51.449733423 self.detect_api = create_detector(detector_config)
2023-03-22 22:09:51.449744153 File "/opt/frigate/frigate/detectors/__init__.py", line 24, in create_detector
2023-03-22 22:09:51.449745235 return api(detector_config)
2023-03-22 22:09:51.449746409 File "/opt/frigate/frigate/detectors/plugins/tensorrt.py", line 198, in __init__
2023-03-22 22:09:51.449747434 assert (
2023-03-22 22:09:51.449748763 AssertionError: TensorRT libraries not found, tensorrt detector not present
2023-03-22 22:09:51.449755820 Exception ignored in: <function TensorRtDetector.__del__ at 0x7f54694ac5e0>
2023-03-22 22:09:51.449761203 Traceback (most recent call last):
2023-03-22 22:09:51.449762561 File "/opt/frigate/frigate/detectors/plugins/tensorrt.py", line 238, in __del__
2023-03-22 22:09:51.449863414 if self.outputs is not None:
2023-03-22 22:09:51.449870823 AttributeError: 'TensorRtDetector' object has no attribute 'outputs'
Operating system
HassOS
Install method
Docker CLI
Coral version
USB
Any other information that may be helpful
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (1 by maintainers)
got it working. needed to add “–runtime=nvidia” to my docker run command.
gotcha, then it will probably be similar to https://github.com/blakeblackshear/frigate/issues/5166 where the library is missing on the host