frigate: [Detector Support]: Unable to generate Tensorrt models

Describe the problem you are having

I’m attempting to generate TensoRT Models with the tensorrt-model container (build nvcr.io/nvidia/tensorrt:23.04-py3). I have followed all of the steps as listed.

I have created a directory I downloaded the script The container variables are configured to point to this directory I ran the chmod -x command

Each time the container starts, I get the error: /opt/nvidia/nvidia_entrypoint.sh: line 49: /tensorrt_models.sh: Is a directory /opt/nvidia/nvidia_entrypoint.sh: line 49: exec: /tensorrt_models.sh: cannot execute: Is a directory

Frigate isn’t loading to the point the webUI shows a camera - it just hangs.

Frigate config file has a lot of things commented out for growth - I’m just trying to test with one camera now to get things running. Admittedly I am new to setting this up, but my gut tells me I’m following just about all of the documentation properly except maybe the config.yml file.

Version

No error - hangs

Frigate config file

mqtt:
  enabled: false
  #host: <home assistant ip address>
  #user: <mqtt broker username config>
  #password: <mqtt broker password config>


go2rtc:
  streams:
    driveway_main:
      - rtsp://<hidden>:554/h264Preview_01_main
      - "ffmpeg:rtsp_cam#audio=opus"
    driveway_sub:
      - rtsp://<hidden>:554/h264Preview_01_sub
      - "ffmpeg:rtsp_cam_sub#audio=opus"
    #doorway_main:
    #  - rtsp://<username>:<password>@<ipaddress>:554/h264Preview_01_main
    #  - "ffmpeg:rtsp_cam#audio=opus"
    #doorway_sub:
    #  - rtsp://<username>:<password>@<ipaddress>:554/h264Preview_01_sub
    #  - "ffmpeg:rtsp_cam_sub#audio=opus"
cameras:
  driveway:
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://<hidden>:8554/driveway_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://<hidden>:8554/driveway_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    record:
      enabled: false
      retain:
        days: 10
        mode: all
      events:
        pre_capture: 10
        post_capture: 20
        objects:
          - person
          - car
        retain:
          default: 15
          mode: active_objects
          objects:
            person: 15
            car: 15
    detect:
      enabled: false
      width: 1280
      height: 720
      fps: 5
    objects:
      filters:
        person:
          min_score: 0.65
          threshold: 0.75
      track:
        - person
        - car
    live:
      stream_name: rtsp_cam_sub
 # doorway:
 #   ffmpeg:
 #     output_args:
 #       record: preset-record-generic-audio-copy
 #     inputs:
 #       - path: rtsp://127.0.0.1:8554/doorway_main
 #         input_args: preset-rtsp-restream
 #         roles:
 #           - record
 #       - path: rtsp://127.0.0.1:8554/doorway_sub
 #         input_args: preset-rtsp-restream
 #         roles:
 #           - detect
 #   record:
 #     enabled: true
 #     retain:
 #       days: 10
 #       mode: all
 #     events:
 #       pre_capture: 10
 #       post_capture: 20
 #       objects:
 #         - person
 #         - car
 #       retain:
 #         default: 15
 #         mode: active_objects
 #         objects:
 #           person: 15
 #           car: 15
 #   detect:
 #     enabled: true
 #     width: 1280
 #     height: 720
 #     fps: 5
 #   objects:
 #     filters:
 #       person:
 #         min_score: 0.65
 #         threshold: 0.75
 #     track:
 #       - person
 #       - car
 #   live:
 #     stream_name: rtsp_cam_sub


detectors:
  tensorrt:
    type: tensorrt
    device: 0

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: true
  # Optional: Width of the output resolution (default: shown below)
  width: 1280
  # Optional: Height of the output resolution (default: shown below)
  height: 720
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 8
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: objects

docker-compose file or Docker CLI command

docker run
  -d
  --name='frigate'
  --net='bridge'
  -e TZ="America/Chicago"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="UnRaid"
  -e HOST_CONTAINERNAME="frigate"
  -e 'FRIGATE_RTSP_PASSWORD'=<hidden>
  -e 'NVIDIA_VISIBLE_DEVICES'=<hidden>
  -e 'NVIDIA_DRIVER_CAPABILITIES'='compute,utility,video'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:5000]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/yayitazale/unraid-templates/main/frigate.png'
  -p '5000:5000/tcp'
  -p '8554:8554/tcp'
  -p '8555:8555/tcp'
  -p '8555:8555/udp'
  -p '1984:1984/tcp'
  -v '/mnt/user/appdata/frigate':'/config':'rw'
  -v '<hidden>':'/media/frigate':'rw'
  -v '/mnt/user/appdata/frigate/trt-models/':'/trt-models':'ro'
  -v '/etc/localtime':'/etc/localtime':'rw'
  --shm-size=256mb
  --mount type=tmpfs,target=/tmp/cache,tmpfs-size=100000000
  --restart unless-stopped
  --runtime=nvidia 'ghcr.io/blakeblackshear/frigate:stable-tensorrt'

6931cd17fcfbd39821276c912da324b9899ccd4cb472ca30880916cd352f1378

Relevant log output

tenorrt-model container
/opt/nvidia/nvidia_entrypoint.sh: line 49: /tensorrt_models.sh: Is a directory
/opt/nvidia/nvidia_entrypoint.sh: line 49: exec: /tensorrt_models.sh: cannot execute: Is a directory

Frigate container

2023-04-30 22:37:44.826976732  [INFO] Preparing go2rtc config...
2023-04-30 22:37:44.828645507  [INFO] Starting Frigate...
2023-04-30 22:37:44.829126108  [INFO] Starting NGINX...
2023-04-30 22:37:44.985112485  [INFO] Starting go2rtc...
2023-04-30 22:37:45.053616869  22:37:45.053 INF go2rtc version 1.2.0 linux/amd64
2023-04-30 22:37:45.053811419  22:37:45.053 INF [api] listen addr=:1984
2023-04-30 22:37:45.054178640  22:37:45.054 INF [rtsp] listen addr=:8554
2023-04-30 22:37:45.054397641  22:37:45.054 INF [srtp] listen addr=:8443
2023-04-30 22:37:45.054535741  22:37:45.054 INF [webrtc] listen addr=:8555
2023-04-30 22:37:45.627538426  [2023-04-30 22:37:45] frigate.app                    INFO    : Starting Frigate (0.12.0-da3e197)
2023-04-30 22:37:45.648552399  [2023-04-30 22:37:45] peewee_migrate                 INFO    : Starting migrations
2023-04-30 22:37:48.131496085  2023/04/30 22:37:48 [error] 134#134: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <hidden>, server: , request: "GET /api/config HTTP/1.1", upstream: "http://127.0.0.1:5001/config", host: "<hidden>", referrer: "<hidden>"
2023-04-30 22:37:48.131564246  <hidden> - - [30/Apr/2023:22:37:48 -0500] "GET /api/config HTTP/1.1" 502 157 "<hidden>" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0" "-"
2023-04-30 22:37:48.598008482  <hidden> - - [30/Apr/2023:22:37:48 -0500] "GET / HTTP/1.1" 200 6641 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0" "-"
2023-04-30 22:37:48.634518884  2023/04/30 22:37:48 [error] 134#134: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <hidden>, server: , request: "GET /api/config HTTP/1.1", upstream: "http://127.0.0.1:5001/config", host: "<hidden>", referrer: "<hidden>"
2023-04-30 22:37:48.634570374  <hidden> - - [30/Apr/2023:22:37:48 -0500] "GET /api/config HTTP/1.1" 502 157 "<hidden>" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0" "-"
2023-04-30 22:37:50.674434828  database is locked
2023-04-30 22:37:51.825081432  [INFO] Service Frigate exited with code 1 (by signal 0)
2023-04-30 22:37:51.834202795  [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
2023-04-30 22:37:51.872028819  [INFO] Service NGINX exited with code 0 (by signal 0)
2023-04-30 22:37:51.875347238  exit OK
2023-04-30 22:37:51.879473978  [INFO] The go2rtc service exited with code 0 (by signal 0)
2023-04-30 22:37:56.450080638  [INFO] Starting Frigate...
2023-04-30 22:37:56.450285038  [INFO] Preparing go2rtc config...
2023-04-30 22:37:56.451696242  [INFO] Starting NGINX...
2023-04-30 22:37:56.614937556  [INFO] Starting go2rtc...
2023-04-30 22:37:56.684143068  22:37:56.684 INF go2rtc version 1.2.0 linux/amd64
2023-04-30 22:37:56.684346538  22:37:56.684 INF [api] listen addr=:1984
2023-04-30 22:37:56.684729679  22:37:56.684 INF [rtsp] listen addr=:8554
2023-04-30 22:37:56.684939050  22:37:56.684 INF [srtp] listen addr=:8443
2023-04-30 22:37:56.685075780  22:37:56.685 INF [webrtc] listen addr=:8555
2023-04-30 22:37:57.295310852  [2023-04-30 22:37:57] frigate.app                    INFO    : Starting Frigate (0.12.0-da3e197)
2023-04-30 22:37:57.319223231  [2023-04-30 22:37:57] peewee_migrate                 INFO    : Starting migrations


Log window keeps closing before i can get a full copy

Operating system

UNRAID

Install method

Docker Compose

Coral version

CPU (no coral)

Any other information that may be helpful

GPU is Quadro P5000

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 26 (6 by maintainers)

Most upvoted comments

Is there a reason you aren’t following our documentation for generating models? https://docs.frigate.video/configuration/detectors#generate-models