Frigate on a Proxmox LXC
HTML-код
- Опубликовано: 19 авг 2023
- How to run Frigate NVR on Proxmox.
❤️ Found this video useful and want to support the channel? I'd love a donation at paypal.me/homeautomationguy
The article showing these steps: www.homeautomationguy.io/blog...
The Frigate Playlist: • AI Home Security Camer...
Frigate Documentation: docs.frigate.video/
My ProxMox Setup: • Building a rack mounte... - Хобби
For anyone following this as of November 2023 the port for the Docker LXC is 9443 not 9000 as stated!
This is exactly what I came here to say too. Thanks for the tutorial Alan, very helpful as always.
I spent more than i hours trying every biso setting, reinstalling proxmox, trying different hard disk, trying different setting in my routor... and this is what went wrong....
It would be great to mention about new port in text version of the tutorial :)
I'd discovered this too by running 'docker ps', but the response I get from 9443 is "Client sent an HTTP request to an HTTPS server." and no portainer.
All other ports don't respond on that IP, just 9443
Ahhh right... I just needed to use IPADDRESS:9443.... okay... all good... moving on.
I love your videos and the specs of your systems. They are everything that I want to do, especially getting it done without the cloud and still getting notifications. I'm still really new and learning the terms and acronyms. Thanks for explaining everything and producing such applicable content.
I'm glad you find them useful! ❤️
I've found your website very useful recently. Thank you for returning to making videos
Thank you!
Finally somone has made the video I have been looking for forever. THANK YOU!
Glad I could help!
Thanks for this, was exactly what I needed! The Coral TPU works much better in an LXC container vs a VM due to the LXC's closer connection to the host hardware. If you pass through the coral usb port or device to a VM you'll find frequent usb restarts in the logs, going the LXC route completely eliminates them. With this tutorial I was up and running within 15 mins and stable ever since! Also worth noting..... the LXC gives faster inference speeds rather than the usb emulation of going via a VM.
Used this to extract my Frigate running in Home Assistant to Proxmox. Worked perfectly, thank you very much!
Great!
Love your videos and blog posts. Hope you are doing well and have not stopped do these videos! Thanks for your hard work, the effort you put into this really shows, great job!
There's been a few too many things going on in life recently so I haven't had time for Home Automation and Videos! I will return!
You are a legend!! Thanx for all the effort into this topic!
I love your tutorials. Thank you, great Work. Just a remark to the Docker Compose script. In my case I had to change the volume information to " - /opt/frigate/config:/config" (without the :ro; -> read only) to make it work. But everything else worked fine. Thanks👍
yes, had to do the same. It seems frigate needs to write a database into that location now
Thanks so much! and thanks for posting your comment here.
I have done several reinstalls without getting Frigate to work. When I removed [:ro] everything started working.
Finally the setup I was in waiting for!
Thanks for another great tutorial. Followed along and spun this up October 1. Now December 4 and no issues with Frigate. Rebooting the host, automated backups that stop/restart the container several times weekly. Running Frigate stable (version 12). The thing I did have issues with is when I tried to use the go2rtc feature inside of Frigate. Repeated random crashes where the CPU and RAM would max out and the container would become unresponsive, necessitating a container re-start. I've set up go2rtc as a standalone docker container in it's own dedicated LXC and it seems to be going fine that way. This may just be unique to my own Proxmox host for some reason.
I've not delved into go2rtc yet... if it ain't broke, then don't fix it - my RTSP streams work great!
cracking video - thanks. I had a higher shared memory size in Portainer because of the number of cams I am running and change the config file from RO to write but successfully migrated tonight - thanks again
Glad it was helpful!
I was waiting for this!!!!!! Thanks a lot!
Awesome tutorial thank you, been wanting to combine my Home Assistant and Frigate installs onto one server and now I have that. Was concerned that the overhead would be high doing it this way but its hardly noticeable.
Glad it helped!
Thank you for this video. very helpful
Good guide, working with proxmox 8.1.3
Firstly awesome video...I nearly gave up on Proxmox for Frigate. Literally I was in the process of downloading ready too move away and then your post this at the exact same time. Perfect!!!
One suggestion is to change the Docker Compose to have RW for the Config directory.
Without this it is not possible to update the configuration from the Frigate UI
Glad it was helpful, and thanks for the RO/RW tip!
Came looking for this. How can I give rights? I'm not so good with linux. @HomeAutomationGuy maybe this step could be added to the blog?
Great video thank you very much
trying to migrate from zm
If you have a permission error when mounting the folder at 7:00, you just need to shut down the target container first. Then run the command and it should work.
cheers , was absolutely clueless why it wasn't working
If you are strugling whether /dev/bus/usb/002 is right number, just go to that folder with coral unplugged, check what this folder contains, plug coral and find whether it have more files inside
actually you can use command: lsusb
Thanks for the tutorial. Do you think this setup is doable for a few cameras (3) without Coral TPU?
Thanks. Wish we could install Frigate in just an LXC alone. I have enough on my plate to learn and docker is at the very bottom.
Hi, thanks for you video. i am wondering why not just use Hikvision or axis camera to filter the false motion alarm since now most this funtion is done on the edge camera not the clould.
HAd never heard of Frigate so thank you. Cheers
You are welcome!
Love it MUCH better than Blueiris!
Thank you for your informative work, i am a beginer in home assistant, i dont have an existing NVR camera system..but i want to implement one. I am stuck on how am going to connect the physical network system between NVR network and HOME ASSISTANT server
Regarding 5:26, normally if you're using Docker you wanna enable that, but since you need to give the container Privileged access anyway due to the Coral, not sure if there's a point adding fuse-overlay so perhaps that's the right call. Normally you use that to interact with non native file systems like NTFS, but running in User Space to avoid giving it privileged access (FUSE = FileSystem in User Space).
There's no guarantee that usb/002 will stay that way and won't become usb/003 or whatever when you add/remove USB devices or change ports. This is the sole reason I use VMs when I need to pass USBs through - you can use manufacturer ID (xxxx:xxxx) that never changes to describe USB devices. Alternatively, you can sometimes map via /dev/serial/by-id/ but not all USB devices are serial :)
Passing USB's through with connection between port changes can be done in the lxc though. It was (for me, not fluent in linux) a hassle that took hours and all the Google fu I could think of. It boils down to another couple of lines in the lxc config file. And probably some more stuff. Sorry, but I can't remember right now exactly how to do it again. And I certainly don´t remember the sites holding the info. It was several forum posts. In different forums...
Love this reply. Could've been my words hahaha. We all know that feeling@@nilssonrichard
@@BrutalCoding Thanks! In hidsight, I should have documented the steps and procedure. Maybe something else you could have written!? ;)
In this specific case of passing through a Google Coral TPU, using a VM would be worse than a LXC due to how Proxmox passes through usb ports as I've sadly recently found out. I was getting frequent USB crashes when passing through either the coral device or the usb port to a VM, turns out proxmox usb emulation can be problematic at times. Using an LXC solves the problem as it has direct access to the usb controller via the host, added benefit being decreased latency of the coral. It immediately solved my crashing device problem and have lower inference speeds too, would recommend.
Facinating thanks.
In Proxmox do you still use run a server VM and inside of that docker with HA,MQTT and Portainer containers with docker compose? Good video btw, very useful im learning Proxmox right now. (This might be answered in the video you mentioned in there video)
No, I run Home Assistant OS inside a VM now. Frigate runs in a separate container on Proxmox and talks to HA and MQTT via the network
@@HomeAutomationGuy Thanks for answering! I’ll look at your other video it probably explains more. I also put all of those files in the /opt/ dir cause of you now 😂
Reolink is NOT cloud based.
It's a bit misleading showing Reolink when talking about sending video streams to a company's cloud for AI processing.
Reolink is all locally process on the cameras/NVR's them selves. Combine that with HA for local push notifications and EVERYTHING is local.
Only time Reolink is cloud based is if you use the Reolink app's notification service (and I belive that's only notifications, not the video streams going through their cloud) or explicitly sign up for cloud video storage.
I really enjoy all your content but, just wanting to make it clear for others that may be looking at or currently Reolink stuff and get confused.
Looking forward toy your detail video on the bed occupancy detection!
Agree, I am all with Reolink locally
Yup, they process everything local. But you still need to block them from internet, because they phone home.
Came here to say just this.. But the AI locally on the cameras themselves can be inaccurate at times no matter the setting. so im looking into frigate myself to supplement. while the cameras do their own cataloging
@@Sch0field8 Only if you have UID enabled to phone home, the whole purpose of that is to tunnel outside of your network to access the cameras remotely..
i'm using 4 reolink e1 pro 8k cams with shinobi right now and wanted to see if frigate is anything better.
The tpu ai stuff confuses me a bit, since reolink PTZ cams, do the autotracking and person/animal/object detection out of the box.
so i dont need that coral tpu, do i??
i dont think so, because my proxmox runs on dual xeon with 28cores/56 threads/64GB ram, so the cpu power is no problem at all
with 4x 8k cams i have no probs running shinobi on a i7-8700k, what is much slower
if frigate does not do the job without the tpu, i am certain i will dump it...
Thanks for the videos, how do i save the videos to the cloud?
Side note:
You may need to preface the IP address with "HTTPS://"
And the default port is 9443, it wasn't 9000 for me.
good find
Great tip, thanks for sharing!
That is great setup proxmox->lxc->docker I'm running such setup since last year, and on 3 locations - everything work flawlessly, even managed to use NVidia gpu for acceleration (that was pain). Nice tutorial, didn't know that there is a docker in lxc script available. I suppose for frigate which is not available from outside priviledged container is okay, but for services that you would put available from public access I would consider unpriviledged LXC. It's then separated from your proxmox host (in a way) and more secure. I did my setup on unpriviledged containers. It needed to fiddle with lxc conf files for passing through usb and gpu, but it works nice, also sub 10ms latency for frigate :)
@@Username-qx9gk good question, two of those is managed through tailscale, as it runs on mobile internet (LTE), no other possibility at location, but tailscale is just for accessing proxmox. I have HASSIO in vms there that are exposed by Cloudflare Argo tunnels, where with Frigate proxy addon I have full access to config etc. in convenient way. 3rd instance is at my home, so fiber connection with OPNsense virtualized to handle routing, reverse proxy and local wildcard certificates. PiKVM is in my wishlist (pricey little thing)
how did you get nvidia to pass from proxmoc>lxc> docker> frigate? i fail to get the drivers on debian working. is there some additional code to be added in the /etc/lxc/xxx? - thanks.
@@cobmahavishnu yeah there is:
# Allow cgroup access
lxc.cgroup2.devices.allow: c 195:* rwm
lxc.cgroup2.devices.allow: c 243:* rwm
# Pass through device files
lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
Put this in /etc/pve/lxc/xxx.conf
also very important, install NVDIA driver on proxmox (you have to build driver, don't install the package), and then in LXC machine do the same build from the same file, but use --no-kernel-modules to have nvidia-smi.
Hope that helps :)
@@fizyk1769 thanks - will try. Though sorry for my ignorance what do you mean by building driver on pve and lxc? is there any link/ guide for that?
@@cobmahavishnu hey Mate, sorry for late answer, I thought I hit reply couple of days ago. By building your own driver I meant to download the installer directly from NVIDIA site and running it, you will need couple of dependencies installed (driver will say what it needs). If you need some additional guidance, you will find lot of tutorials on YT with step by step guide :)
This is great tutorial thanks! Just wishing there was a way for proxmox to recocnize if the TPU usb port changes all of a sudden. Happened me first time today after VE boot.
Mine has continued to work after reboots, but maybe I'm just getting lucky!
great video, everythings up and running without coral (cpu). today i get my coral. connect, reboot host, reboot container, coral tpu not found, frigate is running cams no streams. any help for trouble shooting?
I've followed your great tutorial. Great work again. Everything is working for me except for the motion triggers in home assistant. In the zones nothing gets detected. On the frigate server itself , motion detection on the same zones works perfectly. It's only on home assistant that the created zones on the frigate server , don't detect any motion. Do you have a solution for that?
Hello, quick question, i get the second line for the coral, do i need the first line if i am using AMD CPU (AMD Ryzen 7 5700G), with graphic?
I am able to see everything working and can log into Portainer, but when i use the same IP and go to port 5000 It does not do anything? Also, not sure how to verify that TPU is actually recognizing and working ? Any help would be greatly appreciated!
Hi Friends,
Love the content; looking for some help. I can see the USB in the LXC container (Bus:001-Device:002), but not in the frigate container itself. I guess it's not the LXC config at it's presenting to the host, and the compose yaml file I assume is passing all USBs with this line: /dev/bus/usb:/dev/bus/usb. Any advice? I have also seen you can specify the device in the config.xml like this: device: usb:002 but it's not getting that far.
Any chance you can show us how you created the notifications you have
Can you please release a video on how to update Frigate? I have followed this guide for the installation, but can't figure out how to update. Thank you.
What command would you use to add the M.2 coral to the container?
From the Frigate installation section it has it under devices as
- /dev/apex_0:/dev/apex_0
Is that correct?
Thanks!
Thank *you*! That's so amazing, I really appreciate this 🥰
Great video as well as the other ones. They are helping me a lot!!!
Justo a doubt: why is better to run frigate on docker than using the frigate lxc directly?
I am not familiar with any Frigate LXC, so I'm not sure how this works
I had this eact question too. So from your answer it's just that there are no install methods for Frigate that don't use Docker. Which is kind of funny since Frigate itself can't even know it's in a container, that's point of a container :-) Not a bad answer but somewhat odd, in that we're not getting anything out of this extra layer. I will go read more about Frigate and its installation. Thanks for this video, its production level is top-notch.
Wow... awesome! I tried that before but I couldn't pass-through my GPU and I don't have a coral so performance was bad...
Questions:
Why didn't you bother with GPU pass-through?
Can I use this mapping command to map a NAS shared? how can I add user/password to that command line?
tnx
Do you think Frigate could be installed on a Risc-V computer with a 4TOP NPU? That would be a huge win.
well i did it... sort of
its running, but it doesnt work
no matter - its so much hassle!... i just want my nas to handle cameras for me : [[[[[
thanks for the video and the guide, i learned a lot
how about creating an up-to-date video for face recognition using frigate?
I will once I figure out how to do it! Seems like Deepstack is no more and I'm not sure where to go with it. Any tips or suggestions?
@@HomeAutomationGuy One of the frigate guys forked it and is maintaining it a bit. Also it is actually a quite simple Programm . I customised it a bit for myself to integrate an alpr…
What I am still testing is what detector and model to use. Compreface for example is quite sure of it self. A bit too sure. It frequently reports twigs and other random stuff as known person with 99%.
While AI Server is more precise, it seems a bit scared and reports a lot of unknown…
Thank you for this! I was floundering badly on my own. I got to the point where you used a mount point in the command. I failed on mp0. Do you have a video on mountpoints?
you have to shutdown the container, before you issue the mount point command :-)
Great tutorial. I'm up and running. I did notice that I can't change the Frigate Config and have to go to config.yml to make changes to Frigate. Something about the container being created outside of Portainer doesn't allow access or maybe it's allowing read/write capability in the compose.yml file? I'm not sure but, regardless, I'm happy. Thanks!
Thanks for sharing! Glad you got it up and running
Do you have a copy of your automation to forward screenshots/videos to Signal messenger?
OK, I have Frigate via an LXC (not with Docker) but have managed to passthrough the Coral USB and mount a Proxmox hosted ZFS drive. What I can't seem to do is to get it showing in Frigate for recording.... Anyone got any ideas?
I get a Curl 7 can't connect to 127.0.0.1:5000 error in portainer and the add-on doesn't start. I have no idea how to fix it??
I was working on same thing, however i stoped when i figure out that there is no authentication for frigate. Are you fine that everybody on your network has access to your cameras? I think direct integration to HASS OS is more secure, because there is HASS auth at least.
I use firewall rules to limit the exposure on my network. But your way works just as well, thanks for sharing!
What sort of storage are you using?
In your video you're already in /data folder and mounting relative /data/cctv_clips, doesn't it end up having /data/data/cctv_clips being mounted?
This is insane! How much power is this server using processing these 4 HD streams? Thanks.
150W. But that's running the entire server, not just the video component
Sorry. 150W is for my whole rack, including server, switches, access points, a few small devices, and a UPS
@@HomeAutomationGuy That is not bad. It's like 2 old lightbulbs turned on 24/7!
Hi,
great video!
I miss one point:
Isn't it necessary to install the Coral drivers in the LXC?
Best regards
Gerd
I don't remember doing that 🤔
How do i update frigate in portainer? If i repull image i get error 500..
Thanks for your Video!! Did you install the coral driver on pve or on the lxc? Lsusb does Not Show google inc. As a device
Thanks!
I don't believe I did. I just piped through the port to the Proxmox container which presumably has the right drivers
@@HomeAutomationGuy thanks, I have no idea why this *!#! USB Accelerator does not work ☺
I am having issues with passing the accelerator too. Frigate fails with `frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb` and 30 seconds later `frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.` With a long stack trace with an exception `ValueError: Failed to load delegate from libedgetpu.so.1.0`
I've installed the drivers on Proxmox itself and `lsusb` shows `Bus 002 Device 004: ID 18d1:9302 Google Inc.` on the Proxmox and inside the lxc container. When I tried to do the same from inside the frigate container I see blank next `Bus 002 Device 004: ID 18d1:9302` However what is suspicious `Bus 002 Device 001: ID 1d6b:0003 Linux 6.5.11-8-pve xhci-hcd xHCI Host Controller` inside the frigate docker container and `Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub` on the bus. I installed the driver only to be able to run a pycoral test to see if it was connecting to the host alright and it is working with that test no problem. Any clues to what I am missing?
It turned out that I have `unprivileged: 1` inside the lxc file. After remove that line, everything started to work.
Lol, almost the exact same as my process. Are you able to take backup of the lxc with the mounted external disk folder?
I've taken loads of backups of it. Never tried a restore though 🫣
@@HomeAutomationGuy hmm. I need to look into this more. My snapshot fails to be created.
@@HomeAutomationGuyI am not trying to be flippant, but until you successfully restore you don't really have it
I am concerned running Coral USB 24/7 because it doesn't have thermal throttling. People said it could get quiet hot. Does yours have any issue?
I've never really touched it whilst it's been operating so I've not noticed. I've been using it for almost two years now and it has been flawless.
Do you prefer running home assistant and your other systems on Proxmox over docker? And how so?
Not really, they both work as well as each other. Docker worked perfectly fine, and Proxmox is working perfectly fine. I just really like learning new things, which is why I switched it up when I moved house
@@HomeAutomationGuy Fair enough. Thanks!
You can run an unprivileged container with a USB and video acceleration passthrough, there are just additional steps to get the access rights correct.
Also if your vm storage drives are on zfs you need to enable overlay on zfs otherwise your docker images will be unpacked for every layer and will consume a lot of space.
Interesting, I shall look into the overlay options - thank you!
I have a PCIe coral that i installed and want to configure it to work. How do the step differe a non usb version of the tpu for use in the LXC?
I don't know the answer to that I'm afraid. I've only got the USB coral set up on my system.
How do you set dchp and dns? 4:32
Can you please do a video on the notification you showed? How did you set it up?
When I put the script in to create Docker LXC from the helper in the shell of proxmox, Nothing happens. Any idea what could be wrong. This is like the first step and can't get this to even work. I have a working Frigate inside HA but want to use it in an LXC under Proxmox
Turned out I had a DNS issue, I reinstalled proxmox and set my dns. Then I was able to use helper script.
Sorry, I am a total noob here. what would be the best/easy way to upgrade the Frigate version that is already running in my Docker portainer? running 0.12 I see 0.13.1 is the latest. I am new to docker so I apologize for my basic question.
recreate the image and "repull image" in portainer ui
Thanks for this - got everything working except i can play WebRTC from the live view - Any ideas why?
Make sure you're using a browser that supports WebRTC
Got it eventually sorted by recreating container. Works pretty well.
i follow the instructions ...successfully message came but the portainer not opening ... can you please help
I had the same issue, looks like the script now only sets up the portainer container to forward port 9443, so ipOfYourContainer:9443. You'll have to click around the 'this certificate is busted' notice your browser will show.
ok, i tried frigate, the docker on proxmox way now and compared it to my running proxmox shinobi nvr
but i dont find "benefits" in frigate.
So If you need a reliable NVR, but don't want to run containers inside vms etc. and dont need usb tpu, because your cams like my reolinks,
do the autotracking and object/person detection out of the box without any extra configuration, extra hardware etc.
give shinobi a chance. my shinobi vm runs perfect on proxmox without tricks
but for sure not on Pis or N100 cpus 😉
Has anyone tried using the M.2 coral? I would imagine it would jive well with the docker VM setup
Sadly not. I don't have any spare M.2 slots left. But if you try it please let me know as I'd love to hear how it went!
How to get rw rights to config.yml file so that it can be modified straight from the frigate?
Great automation! Thanks for sharing!
How come you are using frigate vs unifi protect? Is it so you can run a wider camera choice?
I actually run both. Unifi protect takes care of my 24/7 recording and their app is perfect for looking at my cameras in real time, their doorbell features, and scrubbing through historical footage. Unfortunately their AI detection isn't great, and frigate does a far better job in that space. So I use Frigate to alert my phone with stills and clips for things that are recognised as important
Ahh makes sense, I was thinking of something similar myself 👍 currently got Asus mesh, and eufy cameras and was thinking of going all in on unify...
@@danjones3956 if you're happy with what you have, then I wouldn't change.
The WiFi seems to drop devices, despite being and expensive router and node with custom firmware. Then eufy is pretty unreliable 😔
Where did you find the code for the Intel hardware acceleration?
On the Frigate documentation website
Didn't know about Frigate! Im using Project AI on BlueIris but it is on a Windows VM 🤢🤮 but blueiris is rock solid. I hope to see blueiris on linux or docker some times
I've heard good things about BlueIris, but I wanted to stick with Linux and that's when I came across Frigate.
For some reason when i paste the code from github and push enter, nothing happens. Just new line appears
I am having the same problem, did you figure it out?
Hi I am following your video and your guide, but I get the following after this command : root@docker-frigate:/opt# docker compose up -d
no configuration file provided: not found. can you provide me some insight as to what I may be doing wrong?
Make sure you have your docker compose configuration file in the /opt directory and that it's named correctly
I love you
Nawww, shucks 😊
any reason you didn't create the stack file in portainer?
I don't really know all the ins and outs of Portainer, and just use it to view the stack and check the logs. I'm sure it makes a lot more sense to do it all in Portainer, but I started my Docker journey with the config files and just always stayed there.
how would you go about updating frigate in this setup?
You can SSH into the docker PVE and run
docker compose pull
docker compose up --force-recreate --build -d
docker image prune -f
@@HomeAutomationGuy I really appreciate you responding. I usually never get responses, especially on 6 month old videos. Thank you so much!
No problem at all! All part of your friendly neighborhood Home Automation Guy service. I hope it helped!
I keep getting an error in logs when starting to run [Errno 30] Read-only file system: '/config/model_cache'. then it stops all services. Do you know how I can resolve this?
Try removing the :ro from the docker compose file mappings
@@HomeAutomationGuy Thanks for getting back to me. I found this same answer in the Installation Frigate Proxmox discussion. I also had errors with it not detecting USB coral device, but I got that figured out as well. I had to reboot my whole proxmox. Everything is running great. Something I have wanted to do for a very long time. I spent 3 days working on this as I am a noob with linux. But pushed through and now I got it. Thanks a million.
@@MikeRoss-zv9nm It took me about the same amount of time as I'm a linux noob too!
Something in Proxmox must have changed as I had Frigate running great in a previous install but this time I get the [Errno 30] Read-only file system: '/config/model_cache error. I removed the :ro but nothing changed. There doesn't seem to be much I can do. The Frigate folks really don't want to support the Docker/Proxmox LXC folks. Their suggestion is put it in Docker (no Proxmox)
why not running frigate as add-ons in home assistant?
Because way less control on how you do things.
As @blochtheorem mentioned, it helps give me control and separates my services out
Brilliant! Thanks
To be honest, it likely would have been better to run up a Linux VM and run Docker inside a VM instead of under LXC. I am not sure with Frigate and performance, but I would imagine Docker would be better in a VM rather than inside another container. I haven't found any hard data on Frigate. There seems to be equal VM / LXC so I guess mileage may vary depending on how many resources you can allocate to your VM, so take this comment as just my personal preference to run it in a VM and have more granular control of the hardware resources compared to an LXC container
Fair points. I made an (uneducated) assumption that the VM would add more overhead than an LXC, but I honestly have no idea either. But I certainly think your method is valid.
@@HomeAutomationGuy a VM does add quite a bit of overhead, simply by being up it will consume more memory than an LXC container (VM has its own kernel end such that need to be in mem!) also an LXC's resource use is more efficiently provisioned/allocated by proxmox than with a VM. Simply because what resources you allocate to an LXC is only a cap to how much it is allowed to use and not an allocation of resources to its exclusive use and the container knows its running on say a 12 core system but only is allowed 2 cores for example. Whereas with a VM the system will "think" that whatever you assigned to it is exclusively available for it. you can ofcourse over provision and use ballooning and such techniques to try and recover that allocation from a vm again but that still is more overhead than native in an LXC container. However not everything is suited for containers, especially from a security and separation standpoint running a full OS in a VM is better and more secure. but as said that does mean you need say a GB of memory for a single app in stead of just just a few hundred megs. as with all things everything is a trade off,
Why wouldn't you just install frigate directly as an LXC? What is the point of the additional layer of abstraction?
Do you mean Frigate instead of Proxmox?
@@HomeAutomationGuy I do, sorry about that. I will edit my comment.
This is the recommended way based on the installation documents. Frigate comes as a Docker container, it doesn't look like there's an easy way to install it outside of Docker.
Usually there never is a "reason" to run priviliged containers other than to avoid the setup of the cgroups and user id mappings. And yes its tiresome but woth it for security related containers.
"Laziness" is always a reason 😂 But yes, I agree with you!
Best you lol do a smart home tour as you been saying you have the ultimate smart home lol
@Home Automation Guy , create a video where you explain, how to save in cloud, like a folder mounted in google drive, an mp4 from an event. So an API to create an mp4 from an event in frigate, and it is in frigate docs, but there isn't any info about an automation, to put this mp4 created, into a mount folder in cloud.
is useless keep these data in local, a thief can destroy very quickly and you can't have any proof... I don't understand why in internet there isn't any people in the world, that do that.
The hard part isn't to create mp4, there is an API in frigate, but is to create an automation, that create the mp4 from an event from API, that rename this with name of camera, data and hour ( because api create al ways clip.mp4, so in this way overwrite everytime ), and then save this mp4 into a folder where is mounted a for example google drive.
So you have in local and in cloud, and this way is pretty SAFE, imho, not only in local.
I hope that you can do this important tutorial.
Good tutorial, cudos for that. But a bit misleading title, should be "Frigate on the Docker in a Proxmox LXC". I was excited to check the video as I've been looking out how to properly have full installation of Frigate without docker on LXC on my Proxmox cluster. 😀This video did not help as it is one more docker tutorial for Frigate.
been there, done that, is not something to be done. the issue with frigate on proxmox is the fact you can not migrate frigate ct, except if you have as many corals as the number of nodes you have
I don't use the migration or High Availability side of Proxmox, so it's not something I've personally needed to deal with.
@@HomeAutomationGuy in that case I suppose is fine.
If you need to restore you have manual effort again. Recommend doing a vm with this as the passthrough will automatically be restored
I got excited by no docker, as I hate it, then got sad at command line stuff. Why can't it just be an ISO and install like an OS?
That's not how the developers of the software have decided to deploy it. With open source projects you just gotta roll with it, and support them if you get value from it
@HomeAutomationGuy Indeed but I can still wish they did an easy ISO version. The second they do, I'll pounce. But for now, any involvement with Docker just isn't for me, no matter how well videos or articles cover it :)
Hi after some help with mapping usb devise through to LXC
I have listed USB devices as follows
Bus 004 Device 003: ID 1a6e:089a Global Unichip Corp.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 015: ID 8087:0029 Intel Corp. AX200 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1a86:55d4 QinHeng Electronics SONOFF Zigbee 3.0 USB Dongle Plus V2
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
But I only want to map the top 1st device through to the LXC
How to I modify this "/dev/bus/usb/002/ dev/bus/usb/002/ none bind,optional,create=dir 0,0" so it relates to my config ?
Thanks
I have this same issue, Did you find a solution? i haven't but i have tinkered more. I have installed the drivers into frigate and can see the Coral USB as google instead of Global Unichip Corp. Are you running a dell server by any chance?
I have the device showing as
Bus 002 Device 004: ID 18d1:9302 Google Inc.
But the above config doesn't work. I've tweaked it a few ways and can't seem to get this working in any form, Frigate just says no TPU detected and reboots.
Might be worth you trying changing their suggested line to the below see if it works for you without the drivers installed.
lxc.mount.entry: /dev/bus002/device/004/ dev/bus002/device/004/ none bind,optional,create=dir 0,
To confirm this didn't work for me but I've tinkered that much wouldn't be surprised if I haven't broken something else.
So frustrating, Hopefully someone can shed some light on our issue.
Further to this,
I found a solution. Lots of messing around but the below works
lxc.mount.entry: /dev/bus/usb/002/ dev/bus/usb/002/ none bind,optional,create=dir 0,0
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.apparmor.profile: unconfined
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.mount.auto: cgroup:rw
That looks like the UK. If so you are not supposed to be recording that public path like you are. You should be careful as it's reasonable for someone to say that is not legal surveillance. You should at least not be processing that path through your vision engine and blank it off.
Proxmox, LXC... Docker .. you do nto want an other layer ?
I could probably run Proxmox in a VM too!
1st comment :)
Yay! 🌝
Wie so oft Fehlerhafte Beschreibung.
Ugh. Always the Docker thing. Just another abstraction from the real work.
That's true. But it's how Frigate is run unfortunately
followed your guide and got [Errno 2] No such file or directory: '/config/config.yml'... root@nvr-stack:~/opt/frigate/config# ls
config.yml
Maybe I'm missing something?
Shutdown your container before running the "pct set XXX -mp0 /data/cctv_clips,mp=/cctv_clips"