Frigate - cpu detector running on on Proxmox can't get it stable - please help

Bcause…

  1. I know ubuntu and docker (a little)
  2. What else wrt 1?
  3. I had no luck in doing via LXC.
  4. Don’t forget again I have proxmox and a lot of “power” left for frigate with coral.

So yeah that’s pretty much it…

You must set default-shm-size in `/etc/docker/daemon.json’

I think I suggest increase cache before and you made change to vm. Not sure why I not catch this but you must make the change inside vm to affect docker daemon and df command must be run inside docker container for frigate to check /dev/shm and storage usage

this was already a long time in, not sure if you mean this:

df inside container:

root@312e7c7d4613:/opt/frigate# df
Filesystem                        1K-blocks     Used Available Use% Mounted on
overlay                            20511312 14954452   4491900  77% /
tmpfs                                 65536        0     65536   0% /dev
tmpfs                               6132628        0   6132628   0% /sys/fs/cgroup
shm                                   65536    14680     50856  23% /dev/shm
/dev/mapper/ubuntu--vg-ubuntu--lv  20511312 14954452   4491900  77% /config
tmpfs                               6132628        0   6132628   0% /proc/asound
tmpfs                               6132628        0   6132628   0% /proc/acpi
tmpfs                               6132628        0   6132628   0% /proc/scsi
tmpfs                               6132628        0   6132628   0% /sys/firmware
root@312e7c7d4613:/opt/frigate#

Yup. That’s it.
Well. guess I was no help here. :laughing:

Look like it should be 256M but showing 65M.
Wonder if its using that file? in any case it not appear to have high use so maybe it not matter

Oh I really want this so desperately to work stable

in other thread this was provided recommendation for vm
assuming VM setup is issue this may be worth a try

Also, users in other thread were getting similar errors as you
Blake mention it may be result of kernel mismatch or something which may also be resolve by changing vm setup

2 Likes

Idk maybe try debian. Or you can go by my tutorial without the mounting just to check it up?
I will be always available for the remote if you will not have any other options left. I am like 80% sure i could do it

I have already mentioned it here.

I have similar problems as you, I would like to assign the USB Coral Stick directly to HassOS, but I am not averse to running a separate instance for it, in HassOS it would of course be nicer.

Everything works with only CPU processing, but I have a problem with the USB Coral Stick.
I’m not sure if the Coral stick is damaged or if it’s some other kind of error.
I am using Proxmox as host system running HassOS.

lsusb on the host looks like this:



however, it is not completely displayed to me, is this correct?

in the log, it doesn’t look very good, anyway:

* Starting nginx nginx
   ...done.
frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
peewee_migrate                 INFO    : There is nothing to migrate
frigate.app                    INFO    : Camera processor started for back: 49
frigate.app                    INFO    : Capture process started for back: 50
detector.coral                 INFO    : Starting detection process: 46
frigate.mqtt                   INFO    : MQTT connected
Process detector:coral:
frigate.edgetpu                INFO    : Attempting to load TPU as usb
frigate.edgetpu                INFO    : No EdgeTPU detected.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, in __init__
    raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/edgetpu.py", line 124, in run_detector
    object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
  File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
    edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...
frigate.app                    INFO    : Stopping...
frigate.events                 INFO    : Exiting event processor...
frigate.record                 INFO    : Exiting recording maintenance...
frigate.object_processing      INFO    : Exiting object processor...
frigate.watchdog               INFO    : Exiting watchdog...
frigate.events                 INFO    : Exiting event cleanup...
frigate.stats                  INFO    : Exiting watchdog...
peewee.sqliteq                 INFO    : writer received shutdown request, exiting.
root                           INFO    : Waiting for detection process to exit gracefully...

the config file I have changed to that:

detectors:
  coral:
    type: edgetpu
    device: usb
mqtt:
........

is there anything I could check? or is it possibly the host machine?

thanks a lot.

I doubt, since you are running the home assistant apliance version… this had alpine linux as core. I am not familiar with tha but I have seen links that should only be used by “developers” to access this linux ans see the usb devices etc. (e.g. lsusb).

Do you see the stick in the os? Supervisor → system → host → 3 dots → hardware?

I have installed HassOS as follows: proxmox_hassos_install
I ran lsusb on the Proxmox host system

No unfortunately under the 3 dots menu > hardware I only see this:

https://pastebin.com/urwpZvZ3

but i can install a ubuntu/debian or other VM and test the coral stick there
should this help at all

or is there a simple way to test the functionality of the coral stick?

in a VM or on my Mac/Windows computer?

What do you mean?

So did you pass through the coral stick to the vm?

yes just like i did with the deconz stick. this one works great.

can the Coral stick be easily tested for functionality in a more suitable environment?
possibly on a Mac / Windows computer without virtualization

Please do not hijack this topic. You have a new question, open a new topic.

With regards to proxmox and passthrough, I do not know irt hassos. As said it is another os. I think however ut must be possible. But might be worth als opening another separate topic for that.

Hi, may I please aks for some more advise :slight_smile:
I have had Frigate working and am still tuning everything. Have a 128G LXC container but did not tweak the seconds etc. well enough and now it is full and fails to start with:

frigate.events                 WARNING : Consider increasing space available at /tmp/cache or reducing max_seconds in your clips config.
frigate.events                 WARNING : Proactively cleaning up the cache...

According to that I must be in the /tmp/cache but since the container is full and wont start I cannot acces it:

root@frigatelxc /tmp# docker ps
CONTAINER ID        IMAGE                                 COMMAND             CREATED             STATUS              PORTS                                            NAMES
f4b7d0fbe213        blakeblackshear/frigate:0.8.4-amd64   "/run.sh"           2 days ago          Up 10 hours         0.0.0.0:1935->1935/tcp, 0.0.0.0:5000->5000/tcp   frigate
63dd48b1b233        portainer/portainer-ce                "/portainer"        3 days ago          Up 2 days           0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp   portainer
root@frigatelxc /tmp# docker attach f4b7d0fbe213
You cannot attach to a stopped container, start it first
root@frigatelxc /tmp#

This is the hosts (LXC containers with docker):

root@frigatelxc /# df
Filesystem                       1K-blocks      Used Available Use% Mounted on
/dev/mapper/pve-vm--106--disk--0 131062788 131046088         0 100% /
none                                   492         4       488   1% /dev
udev                               8103816         0   8103816   0% /dev/bus/usb/002
tmpfs                              8131696         0   8131696   0% /dev/shm
tmpfs                              8131696    769032   7362664  10% /run
tmpfs                                 5120         0      5120   0% /run/lock
tmpfs                              8131696         0   8131696   0% /sys/fs/cgroup
shm                                  65536         0     65536   0% /var/lib/docker/containers/63dd48b1b2334fbbd90d4c51aa680b8b61df1fa0b75b41fa4ca49e8eff205d67/mounts/shm
root@frigatelxc /#

Before, i had a smaller container and this happened a lot quicker (32G) and when I just increased the size it would not start up at all… so i am reluctant to increase it…
So now I am a bit lost (let’s say a lot)…

Im no Linux specialist but as you can see you use all 128GB (131040688) of your Storage space

Figure out what’s taking up this space.
I think you have record enabled so maybe it’s just the recording or even clips

Hello guys,

Today a switched from my Debian 10 installation to a Proxmox System.
My HW is a Intel Nuc with an i3 7100U.

Previously, in my config.yml I had the following parameters:

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

Now i Have a VM with Open Media Vault 6 together with Docker, but no one of those parameters are wirking, producing a lot of errors.

Also, Without them I have a RAM utilization really hight.

Can i use some kind of hw acceleration settings using proxmox?

Did you find a working solution to getting the usb coral working in a virtualized setup? If so, would you mind giving me sone pointers over here in this thread?