blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.24k stars 1.66k forks source link

Tensorrt-stable image reinitialized each time container starts #10140

Closed gelato closed 6 months ago

gelato commented 6 months ago

Right now each time container starts download_yolo.sh is executed, which downloads weights (140+mb occasionaly on 30kbps from github) and converts model. So basically this defeats the whole purpose of running frigate in the container. This makes nvidia setup with embedded models pretty much unusable in containerized environments. And deepstack combo because of http requests will be even slower than using cpu as a detector, i think... Nvidia solution already has tensorrt-stable separate image, maybe it is ok to bake in a few models to avoid redownloading them each time container starts?

NickM-27 commented 6 months ago

The default behavior is already to cache them. If it's not doing that this is due to an error in your docker config.

gelato commented 6 months ago

Can you please tell me what kind of config part regulates that? Currently i'm mounting /data on persistent volume and that's it. Every other volume is ephemeral. And yes, i'm using k8s, if that matters...

NickM-27 commented 6 months ago

/config needs the entire directory mounted as /config/model_cache/... is where models are cached.