Changed GPU and now detection doesn't work, frigate crashes
I was using an intel iGPU, and now I'm using an Nvidia GPU on a different computer.
I changed the image to "frigate:0.17.2**-tensorrt**"
/dev/dri/renderD128 stayed the same as before.
#Solution:
Remove "-tensorrt" from the image name
Install Nvidia drivers on my Ubuntu VM to where the 'NVIDIA-SMI' command would work.
THEN add this to the docker config:
deploy:
resources:
reservations:
devices:
# Reserve all available GPUs
- driver: nvidia
count: all
capabilities: [gpu]
Thank you.
#Docker Config services: frigate: container_name: frigate privileged: true restart: unless-stopped stop_grace_period: 30s image: ghcr.io/blakeblackshear/frigate:0.17.2-tensorrt secrets: - frigate_rtsp_pass shm_size: "512mb" devices: - /dev/dri/renderD128:/dev/dri/renderD128 volumes: - /etc/localtime:/etc/localtime:ro - frigate:/config - /mnt/FrigateMedia:/media/frigate - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear target: /tmp/cache tmpfs: size: 1000000000 ports: - "8971:8971" - "5000:5000" # Internal unauthenticated access. Expose carefully. - "8554:8554" # RTSP feeds - "8555:8555/tcp" # WebRTC over tcp - "8555:8555/udp" # WebRTC over udp - "1984:1984" # Go2RTC environment: FRIGATE_RTSP_PASSWORD: frigate_rtsp_pass YOLO_MODELS: yolov9-t-320 NVIDIA_VISIBLE_DEVICES: all NVIDIA_DRIVER_CAPABILITIES: compute,utility,video
secrets:
frigate_rtsp_pass:
file: /var/lib/docker/secrets/frigate_rtsp_pass.txt
volumes:
frigate:
#Frigate Config version: 0.17-2
detect:
enabled: true
tls:
enabled: false
detectors:
onnx_0:
type: onnx
device: GPU
model:
model_type: yolo-generic
width: 320 # <--- should match the imgsize set during model export
height: 320 # <--- should match the imgsize set during model export
input_tensor: nchw
input_dtype: float
path: /config/model_cache/yolov9-t-320.onnx
labelmap_path: /labelmap/coco-80.txt
ffmpeg:
hwaccel_args: preset-nvidia
#Record
record:
enabled: true
go2rtc:
streams:
FrontYard:
rtsp://admin:PASSWORD@192.168.1.6/cam/realmonitor?channel=1&subtype=0
FrontYardSub:
rtsp://admin:PASSWORD@192.168.1.6/cam/realmonitor?channel=1&subtype=1
cameras:
FrontYard:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/FrontYard?video=copy
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/FrontYardSub?video=copy
input_args: preset-rtsp-restream
roles:
- detect
output_args:
record: preset-record-generic-audio-copy
live:
streams:
FrontYard: FrontYard