frigate/docker-compose.yml
2024-03-17 15:21:58 -05:00

43 lines
1.3 KiB
YAML

version: "3"
services:
devcontainer:
container_name: frigate-devcontainer
# add groups from host for render, plugdev, video
group_add:
- "109" # render
- "110" # render
- "44" # video
- "46" # plugdev
shm_size: "256mb"
build:
context: .
dockerfile: docker/main/Dockerfile
target: devcontainer
# Run this command to build the devcontainer with tensorrt support, then uncomment the image and deploy blocks and comment the build block above
# ARCH=amd64 docker buildx bake --load --file=docker/tensorrt/trt.hcl --set tensorrt.tags=frigate:devcontainer-trt devcontainer-trt
# image: frigate:devcontainer-trt
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
environment:
YOLO_MODELS: yolov7-320
devices:
- /dev/bus/usb:/dev/bus/usb
# - /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware
volumes:
- .:/workspace/frigate:cached
- ./web/dist:/opt/frigate/web:cached
- /etc/localtime:/etc/localtime:ro
- ./config:/config
- ./debug:/media/frigate
- /dev/bus/usb:/dev/bus/usb
mqtt:
container_name: mqtt
image: eclipse-mosquitto:1.6
ports:
- "1883:1883"