Add support for TensorRT devcontainer

This commit is contained in:
Nate Meyer 2022-12-28 12:16:40 -05:00
parent a16231e624
commit bd10a27376
2 changed files with 9 additions and 0 deletions

View File

@ -304,3 +304,9 @@ COPY --from=rootfs / /
FROM frigate AS frigate-tensorrt
RUN --mount=type=bind,from=wheels,source=/trt-wheels,target=/deps/trt-wheels \
pip3 install -U /deps/trt-wheels/*.whl
# Dev Container w/ TRT
FROM devcontainer AS devcontainer-trt
RUN --mount=type=bind,from=wheels,source=/trt-wheels,target=/deps/trt-wheels \
pip3 install -U /deps/trt-wheels/*.whl

View File

@ -11,6 +11,7 @@ services:
shm_size: "256mb"
build:
context: .
# Use target devcontainer-trt for TensorRT dev
target: devcontainer
deploy:
resources:
@ -28,6 +29,8 @@ services:
- /etc/localtime:/etc/localtime:ro
- ./config/config.yml:/config/config.yml:ro
- ./debug:/media/frigate
# Create the trt-models folder using the documented method of generating TRT models
# - ./debug/trt-models:/trt-models
- /dev/bus/usb:/dev/bus/usb
mqtt:
container_name: mqtt