61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
version: "3"
|
|
services:
|
|
frigate:
|
|
# image: ghcr.io/blakeblackshear/frigate:stable
|
|
image: ghcr.io/blakeblackshear/frigate:stable-tensorrt
|
|
container_name: frigate
|
|
# restart: unless-stopped
|
|
restart: always
|
|
# user: vscode
|
|
privileged: true
|
|
shm_size: "256mb"
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- frigate-config:/config/
|
|
- frigate-trt-models:/trt-models
|
|
- frigate-storage:/media/frigate
|
|
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
|
|
target: /tmp/cache
|
|
tmpfs:
|
|
size: 1000000000
|
|
- /dev/bus/usb:/dev/bus/usb
|
|
- /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
ports:
|
|
- "1935:1935"
|
|
- "5000:5000"
|
|
- "5001:5001"
|
|
- "8080:8080"
|
|
# network_mode: host
|
|
|
|
volumes:
|
|
frigate-config:
|
|
driver: local
|
|
driver_opts:
|
|
type: 'none'
|
|
o: 'bind'
|
|
device: '/${BASEDIR}/frigate/config/'
|
|
frigate-trt-models:
|
|
driver: local
|
|
driver_opts:
|
|
type: 'none'
|
|
o: 'bind'
|
|
device: '/${BASEDIR}/frigate/trt-models/'
|
|
# frigate-storage:
|
|
# driver: local
|
|
# driver_opts:
|
|
# type: 'none'
|
|
# o: 'bind'
|
|
# device: '/${STORAGEDIR}'
|
|
frigate-storage:
|
|
driver_opts:
|
|
type: 'nfs'
|
|
o: 'addr=nas,nfsvers=4,nolock,soft,rw'
|
|
device: ':/Frigate'
|