mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Move dev container to trt
This commit is contained in:
parent
8d51952ae9
commit
810f3f4e3a
@ -223,16 +223,6 @@ RUN --mount=type=bind,source=./requirements-dev.txt,target=/workspace/frigate/re
|
|||||||
|
|
||||||
CMD ["sleep", "infinity"]
|
CMD ["sleep", "infinity"]
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
|
|
||||||
# Frigate web build
|
# Frigate web build
|
||||||
# This should be architecture agnostic, so speed up the build on multiarch by not using QEMU.
|
# This should be architecture agnostic, so speed up the build on multiarch by not using QEMU.
|
||||||
|
|||||||
@ -37,3 +37,13 @@ RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels
|
|||||||
|
|
||||||
WORKDIR /opt/frigate/
|
WORKDIR /opt/frigate/
|
||||||
COPY --from=rootfs / /
|
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
|
||||||
|
|||||||
@ -13,7 +13,12 @@ target wheels {
|
|||||||
platforms = ["linux/amd64"]
|
platforms = ["linux/amd64"]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "tensorrt" {
|
target devcontainer {
|
||||||
|
dockerfile = "docker/main/Dockerfile"
|
||||||
|
platforms = ["linux/amd64"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target tensorrt {
|
||||||
dockerfile = "docker/tensorrt/Dockerfile"
|
dockerfile = "docker/tensorrt/Dockerfile"
|
||||||
context = "."
|
context = "."
|
||||||
contexts = {
|
contexts = {
|
||||||
@ -22,4 +27,16 @@ target "tensorrt" {
|
|||||||
wheels = "target:wheels"
|
wheels = "target:wheels"
|
||||||
}
|
}
|
||||||
platforms = ["linux/amd64"]
|
platforms = ["linux/amd64"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target devcontainer-trt {
|
||||||
|
dockerfile = "docker/tensorrt/Dockerfile"
|
||||||
|
context = "."
|
||||||
|
contexts = {
|
||||||
|
deps = "target:deps",
|
||||||
|
rootfs = "target:rootfs"
|
||||||
|
wheels = "target:wheels"
|
||||||
|
devcontainer = "target:devcontainer
|
||||||
|
}
|
||||||
|
platforms = ["linux/amd64"]
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user