2023-10-07 16:51:02 +02:00
|
|
|
# syntax=docker/dockerfile:1.6
|
2023-07-26 12:50:41 +02:00
|
|
|
|
|
|
|
# https://askubuntu.com/questions/972516/debian-frontend-environment-variable
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
ARG TRT_BASE=nvcr.io/nvidia/tensorrt:23.03-py3
|
|
|
|
|
|
|
|
# Build TensorRT-specific library
|
|
|
|
FROM ${TRT_BASE} AS trt-deps
|
|
|
|
|
2024-03-05 13:04:13 +01:00
|
|
|
ARG COMPUTE_LEVEL
|
|
|
|
|
2023-07-26 12:50:41 +02:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y git build-essential cuda-nvcc-* cuda-nvtx-* libnvinfer-dev libnvinfer-plugin-dev libnvparsers-dev libnvonnxparsers-dev \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN --mount=type=bind,source=docker/tensorrt/detector/tensorrt_libyolo.sh,target=/tensorrt_libyolo.sh \
|
|
|
|
/tensorrt_libyolo.sh
|
|
|
|
|
|
|
|
# Frigate w/ TensorRT Support as separate image
|
|
|
|
FROM deps AS tensorrt-base
|
|
|
|
|
|
|
|
#Disable S6 Global timeout
|
|
|
|
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
|
|
|
|
|
|
|
|
COPY --from=trt-deps /usr/local/lib/libyolo_layer.so /usr/local/lib/libyolo_layer.so
|
|
|
|
COPY --from=trt-deps /usr/local/src/tensorrt_demos /usr/local/src/tensorrt_demos
|
|
|
|
COPY docker/tensorrt/detector/rootfs/ /
|
2024-11-08 14:37:18 +01:00
|
|
|
ENV YOLO_MODELS=""
|
2023-10-07 16:21:03 +02:00
|
|
|
|
|
|
|
HEALTHCHECK --start-period=600s --start-interval=5s --interval=15s --timeout=5s --retries=3 \
|
|
|
|
CMD curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1
|