mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-29 00:06:19 +01:00
a96a951e23
* Non-Jetson changes Required for later commits: - Allow base image to be overridden (and don't assume its WORKDIR) - Ensure python3.9 - Map hwaccel decode presets as strings instead of lists Not required: - Fix existing documentation - Simplify hwaccel scale logic * Prepare for multi-arch tensorrt build * Add tensorrt images for Jetson boards * Add Jetson ffmpeg hwaccel * Update docs * Add CODEOWNERS * CI * Change default model from yolov7-tiny-416 to yolov7-320 In my experience the tiny models perform markedly worse without being much faster * fixup! Update docs
33 lines
1.2 KiB
Docker
33 lines
1.2 KiB
Docker
# syntax=docker/dockerfile:1.4
|
|
|
|
# https://askubuntu.com/questions/972516/debian-frontend-environment-variable
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Make this a separate target so it can be built/cached optionally
|
|
FROM wheels as trt-wheels
|
|
ARG DEBIAN_FRONTEND
|
|
ARG TARGETARCH
|
|
|
|
# Add TensorRT wheels to another folder
|
|
COPY docker/tensorrt/requirements-amd64.txt /requirements-tensorrt.txt
|
|
RUN mkdir -p /trt-wheels && pip3 wheel --wheel-dir=/trt-wheels -r /requirements-tensorrt.txt
|
|
|
|
FROM tensorrt-base AS frigate-tensorrt
|
|
ENV TRT_VER=8.5.3
|
|
RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels \
|
|
pip3 install -U /deps/trt-wheels/*.whl && \
|
|
ldconfig
|
|
|
|
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
|
|
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 \
|
|
pip3 install -U /deps/trt-wheels/*.whl
|