mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
Update library loading for tensorrt (#5087)
* Update library loading for tensorrt * Add symlink to libnvrtc
This commit is contained in:
parent
19d17c8c81
commit
60b2315028
@ -269,7 +269,9 @@ COPY --from=rootfs / /
|
||||
# Frigate w/ TensorRT Support as separate image
|
||||
FROM frigate AS frigate-tensorrt
|
||||
RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels \
|
||||
pip3 install -U /deps/trt-wheels/*.whl
|
||||
pip3 install -U /deps/trt-wheels/*.whl && \
|
||||
ln -s libnvrtc.so.11.2 /usr/local/lib/python3.9/dist-packages/nvidia/cuda_nvrtc/lib/libnvrtc.so && \
|
||||
ldconfig
|
||||
|
||||
# Dev Container w/ TRT
|
||||
FROM devcontainer AS devcontainer-trt
|
||||
|
5
docker/rootfs/etc/ld.so.conf.d/cuda_tensorrt.conf
Normal file
5
docker/rootfs/etc/ld.so.conf.d/cuda_tensorrt.conf
Normal file
@ -0,0 +1,5 @@
|
||||
/usr/local/lib/python3.9/dist-packages/nvidia/cudnn/lib
|
||||
/usr/local/lib/python3.9/dist-packages/nvidia/cuda_runtime/lib
|
||||
/usr/local/lib/python3.9/dist-packages/nvidia/cublas/lib
|
||||
/usr/local/lib/python3.9/dist-packages/nvidia/cuda_nvrtc/lib
|
||||
/usr/local/lib/python3.9/dist-packages/tensorrt
|
@ -75,12 +75,6 @@ class TensorRtDetector(DetectionApi):
|
||||
|
||||
def _load_engine(self, model_path):
|
||||
try:
|
||||
ctypes.cdll.LoadLibrary(
|
||||
"/usr/local/lib/python3.9/dist-packages/nvidia/cuda_runtime/lib/libcudart.so.11.0"
|
||||
)
|
||||
ctypes.cdll.LoadLibrary(
|
||||
"/usr/local/lib/python3.9/dist-packages/tensorrt/libnvinfer.so.8"
|
||||
)
|
||||
trt.init_libnvinfer_plugins(self.trt_logger, "")
|
||||
|
||||
ctypes.cdll.LoadLibrary("/trt-models/libyolo_layer.so")
|
||||
|
@ -5,4 +5,5 @@ cuda-python == 11.7; platform_machine == 'x86_64'
|
||||
cython == 0.29.*; platform_machine == 'x86_64'
|
||||
nvidia-cuda-runtime-cu11 == 11.7.*; platform_machine == 'x86_64'
|
||||
nvidia-cublas-cu11 == 11.11.*; platform_machine == 'x86_64'
|
||||
nvidia-cudnn-cu11 == 8.7.*; platform_machine == 'x86_64'
|
||||
nvidia-cudnn-cu11 == 8.7.*; platform_machine == 'x86_64'
|
||||
nvidia-cuda-nvrtc-cu11 == 11.7.*; platform_machine == 'x86_64'
|
Loading…
Reference in New Issue
Block a user