2023-07-23 23:45:29 +02:00
|
|
|
# syntax=docker/dockerfile:1.4
|
|
|
|
|
|
|
|
# https://askubuntu.com/questions/972516/debian-frontend-environment-variable
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2025-02-26 21:39:19 +01:00
|
|
|
# Globally set pip break-system-packages option to avoid having to specify it every time
|
|
|
|
ARG PIP_BREAK_SYSTEM_PACKAGES=1
|
2023-07-23 23:45:29 +02:00
|
|
|
|
2023-07-26 12:50:41 +02:00
|
|
|
FROM tensorrt-base AS frigate-tensorrt
|
2025-02-26 21:39:19 +01:00
|
|
|
ARG PIP_BREAK_SYSTEM_PACKAGES
|
2024-12-18 17:46:21 +01:00
|
|
|
ENV TRT_VER=8.6.1
|
2025-02-26 21:39:19 +01:00
|
|
|
|
|
|
|
# Install TensorRT wheels
|
|
|
|
COPY docker/tensorrt/requirements-amd64.txt /requirements-tensorrt.txt
|
|
|
|
RUN pip3 install -U -r /requirements-tensorrt.txt && ldconfig
|
2023-07-23 23:45:29 +02:00
|
|
|
|
|
|
|
WORKDIR /opt/frigate/
|
|
|
|
COPY --from=rootfs / /
|
|
|
|
|
|
|
|
# Dev Container w/ TRT
|
|
|
|
FROM devcontainer AS devcontainer-trt
|
|
|
|
|
|
|
|
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
|
2024-12-22 19:13:29 +01:00
|
|
|
COPY --from=trt-deps /usr/local/cuda-12.1 /usr/local/cuda
|
2023-07-23 23:45:29 +02:00
|
|
|
COPY docker/tensorrt/detector/rootfs/ /
|
|
|
|
COPY --from=trt-deps /usr/local/lib/libyolo_layer.so /usr/local/lib/libyolo_layer.so
|
|
|
|
RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels \
|
2025-02-18 15:38:07 +01:00
|
|
|
pip3 install -U /deps/trt-wheels/*.whl
|