frigate: [Support]: unable to start service trt-model-prepare: command exited 4

Describe the problem you are having

Frigate fails to start, hangs on go2rtc health check starting but earlier in the logs this can be seen: unable to start service trt-model-prepare: command exited 4

Version

0.13.1

Frigate config file

mqtt:
  host: 192.168.111.2
  user: mqttuser
  password: password

birdseye:
  enabled: True
  mode: continuous

# webrtc:
#   network_mode: host

detect:
  enabled: True

objects:
  track:
    - person
    - dog
    - cat
    - car

record:
  enabled: True
  events: 
    pre_capture: 10
    post_capture: 10
    retain:
      default: 30

cameras:
  entrance:
    enabled: True
    record:
      events:
        required_zones:
          - front_porch
    snapshots:
      enabled: True
      required_zones:
        - front_porch
    ffmpeg:
      hwaccel_args: preset-nvidia-h264
      inputs:
        - path: rtsp://192.168.111.2:32869/98a2372c50e1606b
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://192.168.111.2:32869/0f477492eb6d033c
          input_args: preset-rtsp-restream
          roles:
            - detect
    zones:
      front_porch:
        coordinates: 0,720,1280,720,1280,0,770,0,402,236,359,235,271,266,151,427,0,594

  front_doorbell:
    record:
      events:
        required_zones:
          - front_porch
    snapshots:
      enabled: True
      required_zones:
        - front_porch
    ffmpeg:
      hwaccel_args: preset-nvidia-h264
      inputs:
        - path: rtsp://192.168.111.2:45161/eeb9918ab44c8350
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://192.168.111.2:45161/ebd99ea4be2c98dc
          input_args: preset-rtsp-restream
          roles:
            - record
    motion:
      mask:
        - 1920,0,1920,551,0,554,0,0
    zones:
      front_porch:
        coordinates: 0,493,91,493,208,509,296,544,404,544,493,633,577,648,726,660,753,635,888,569,1028,643,1236,614,1280,720,909,720,0,720
  
  
  garage:
    ffmpeg:
      hwaccel_args: preset-nvidia-h264
      inputs:
        - path: rtsp://192.168.111.2:35705/fd1734abb5ba49ae
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://192.168.111.2:35705/4540a170ea6fe583
          input_args: preset-rtsp-restream
          roles:
            - record
    snapshots:
      enabled: True
    
  rear:
    record:
      events:
        required_zones:
          - rear_entrance
    snapshots:
      enabled: True
      required_zones:
        - rear_entrance
    ffmpeg:
      hwaccel_args: preset-nvidia-h264
      inputs:
        - path: rtsp://192.168.111.2:35863/c59dd8784e1fcd63
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://192.168.111.2:35863/c6c7806ac11fde3a
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 1280,0,1280,160,616,151,0,214,0,0
    zones:
      rear_entrance:
        coordinates: 0,720,1280,720,1280,265,975,244,669,344,532,332,0,460

detectors:
  tensorrt:
    type: tensorrt
    device: 0 #This is the default, select the first GPU

model:
  path: /trt-models/yolov7-tiny-416.trt
  input_tensor: nchw
  input_pixel_format: rgb
  width: 416
  height: 416

Relevant log output

s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service trt-model-prepare: starting
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service go2rtc-healthcheck: starting
s6-rc: info: service go2rtc-healthcheck successfully started
s6-rc: warning: unable to start service trt-model-prepare: command exited 4
Generating the following TRT Models: yolov7-320
Downloading yolo weights
2024-02-02 12:05:28.557380958  [INFO] Preparing new go2rtc config...
2024-02-02 12:05:29.100473605  [INFO] Starting go2rtc...
2024-02-02 12:05:29.214640443  12:05:29.214 INF go2rtc version 1.8.4 linux/amd64
2024-02-02 12:05:29.215275433  12:05:29.215 INF [rtsp] listen addr=:8554
2024-02-02 12:05:29.215321304  12:05:29.215 INF [api] listen addr=:1984
2024-02-02 12:05:29.215545025  12:05:29.215 INF [webrtc] listen addr=:8555
2024-02-02 12:05:38.512415766  [INFO] Starting go2rtc healthcheck service...

FFprobe output from your camera

N/A

Frigate stats

No response

Operating system

UNRAID

Install method

Docker Compose

Coral version

Other

Network connection

Wired

Camera make and model

N/A

Any other information that may be helpful

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 26

Most upvoted comments

right, runtime works fine for now but at some point it will not work which is why the recommendation is to use gpus=all

hey so for me, it was the changes to the the way tensorrt is handled in v13. ive got mine working now.

one thing ive noticed in your config: in your docker compose, under ‘YOLO_MODELS’ you’ve got v4, but in your config.yml you’ve got v7. not sure if that might be the cause?