weltenwort / frigate-synology-dsm7 Goto Github PK
View Code? Open in Web Editor NEWDockerfile and docker-compose file to enable google coral USB accelerators in containers on Synology DSM 7
License: MIT License
Dockerfile and docker-compose file to enable google coral USB accelerators in containers on Synology DSM 7
License: MIT License
First of all, thank you very much. Your tool is great. Install your frigate-syntax-dsm7, and then Google core USB just needs to plug into synology to work normally? Don't I need to install the edge TPU runtime on the official website?
I'm curious about the support for ffmpeg's hardware acceleration.
Since most Synology devices are Intel based, has the support for Quicksync been tested?
Is it
sudo docker-compose up --detach --force-create
or
sudo docker-compose up --detach --force-recreate
First of all, what a great project, thanks for sharing.
I have a question and I am wondering how you solved this. I wanted to run the newest frigate on DSM7.
I changed these two lines in the dockerfile (line 1 and 16):
From:
FROM blakeblackshear/frigate:0.10.0-amd64 AS build
FROM blakeblackshear/frigate:0.10.0-amd64
To:
FROM blakeblackshear/frigate:0.11.0-beta2 AS build
FROM blakeblackshear/frigate:0.11.0-beta2
If I want to build this docker I get:
Err:5 http://archive.ubuntu.com/ubuntu focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
W: GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://archive.ubuntu.com/ubuntu focal InRelease' is not signed.
Normally (it's not safe I know) you can solve this by adding:
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
To run this you need to have gnupg2 installed. So I can add this to the dockerfile:
RUN apt-get -y install gnupg2
The problem I am facing then is that for installing gnupg2 I get the same signature verification error.
How did you manage to solve this, or am I doing something wrong here?
USB accelerator is normal in MAC test, but ds918plus is connected to USB
An error occurred when frigate-synthesis-dsm7 was started on DSM 7.1. Type: CPU can run normally. If you change it to type: edgetpu device: USB, an error occurs. Relevant parameters and logs are as follows
DS918plus
DSM 7.1-42661 Update 1
frigate-synthesis-dsm7 v0.11.0-beta5
date | stream | content |
---|---|---|
2022-07-18T12:22:39.671062764Z | stdout | [s6-finish] sending all processes the KILL signal and exiting. |
2022-07-18T12:22:36.629981766Z | stdout | [s6-finish] sending all processes the TERM signal. |
2022-07-18T12:22:36.424630358Z | stdout | [s6-finish] waiting for services. |
2022-07-18T12:22:36.423829316Z | stdout | [cont-finish.d] done. |
2022-07-18T12:22:36.423081302Z | stdout | [cont-finish.d] executing container finish scripts... |
2022-07-18T12:22:34.355030664Z | stdout | [2022-07-18 20:22:34] detector.coral INFO : Starting detection process: 217 |
2022-07-18T12:22:34.349941425Z | stdout | [2022-07-18 20:22:34] ws4py INFO : Using epoll |
2022-07-18T12:22:34.340698166Z | stdout | [2022-07-18 20:22:34] frigate.app INFO : Output process started: 218 |
2022-07-18T12:22:34.309096970Z | stdout | [2022-07-18 20:22:34] peewee_migrate INFO : There is nothing to migrate |
2022-07-18T12:22:34.308911291Z | stdout | There is nothing to migrate |
2022-07-18T12:22:34.298965370Z | stdout | [2022-07-18 20:22:34] peewee_migrate INFO : Starting migrations |
2022-07-18T12:22:34.298734195Z | stdout | Starting migrations |
2022-07-18T12:22:34.226243735Z | stdout | [2022-07-18 20:22:34] frigate.app INFO : Starting Frigate (0.11.0-ef54cd6) |
2022-07-18T12:22:31.402799563Z | stdout | [services.d] done. |
2022-07-18T12:22:31.386422397Z | stdout | [services.d] starting services |
2022-07-18T12:22:31.385326373Z | stdout | [cont-init.d] done. |
2022-07-18T12:22:31.384253675Z | stdout | [cont-init.d] executing container initialization scripts... |
2022-07-18T12:22:31.383127055Z | stdout | [fix-attrs.d] done. |
2022-07-18T12:22:31.382199135Z | stdout | [fix-attrs.d] applying ownership & permissions fixes... |
2022-07-18T12:22:31.380726367Z | stdout | [s6-init] ensuring user provided files have correct perms...exited 0. |
2022-07-18T12:22:31.332846635Z | stdout | [s6-init] making user provided files available at /var/run/s6/etc...exited 0. |
2022-07-18T12:22:26.283060104Z | stdout | [s6-finish] sending all processes the KILL signal and exiting. |
2022-07-18T12:22:23.249121383Z | stdout | [s6-finish] sending all processes the TERM signal. |
2022-07-18T12:22:23.020157007Z | stdout | [s6-finish] waiting for services. |
2022-07-18T12:22:23.019535029Z | stdout | [cont-finish.d] done. |
2022-07-18T12:22:23.018488273Z | stdout | [cont-finish.d] executing container finish scripts... |
2022-07-18T12:22:23.017116491Z | stdout | [2022-07-18 20:22:23] frigate.video ERROR : fristcamera: ffmpeg process is not running. exiting capture thread... |
2022-07-18T12:22:23.015518451Z | stdout | [2022-07-18 20:22:23] frigate.video ERROR : fristcamera: Unable to read frames from ffmpeg process. |
2022-07-18T12:22:22.996774149Z | stdout | [2022-07-18 20:22:22] frigate.video ERROR : ketingcamera: ffmpeg process is not running. exiting capture thread... |
2022-07-18T12:22:22.995761498Z | stdout | [2022-07-18 20:22:22] frigate.video ERROR : ketingcamera: Unable to read frames from ffmpeg process. |
2022-07-18T12:22:22.960501899Z | stdout | [2022-07-18 20:22:22] frigate.watchdog INFO : Detection appears to have stopped. Exiting frigate... |
2022-07-18T12:22:16.396147061Z | stdout | |
2022-07-18T12:22:16.396103229Z | stdout | ValueError: Failed to load delegate from libedgetpu.so.1.0 |
2022-07-18T12:22:16.396053429Z | stdout | raise ValueError('Failed to load delegate from {}\n{}'.format( |
2022-07-18T12:22:16.396001281Z | stdout | File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate |
2022-07-18T12:22:16.395953859Z | stdout | edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config) |
2022-07-18T12:22:16.395902929Z | stdout | File "/opt/frigate/frigate/edgetpu.py", line 43, in init |
2022-07-18T12:22:16.395859341Z | stdout | object_detector = LocalObjectDetector( |
2022-07-18T12:22:16.395793017Z | stdout | File "/opt/frigate/frigate/edgetpu.py", line 135, in run_detector |
2022-07-18T12:22:16.395748078Z | stdout | self._target(*self._args, **self._kwargs) |
2022-07-18T12:22:16.395700094Z | stdout | File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run |
2022-07-18T12:22:16.395657565Z | stdout | self.run() |
2022-07-18T12:22:16.395584309Z | stdout | File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap |
2022-07-18T12:22:16.395480361Z | stdout | Traceback (most recent call last): |
2022-07-18T12:22:16.395336457Z | stdout | |
2022-07-18T12:22:16.395280546Z | stdout | During handling of the above exception, another exception occurred: |
2022-07-18T12:22:16.395243705Z | stdout | |
2022-07-18T12:22:16.395202847Z | stdout | ValueError |
2022-07-18T12:22:16.395155119Z | stdout | raise ValueError(capture.message) |
2022-07-18T12:22:16.395091561Z | stdout | File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in init |
2022-07-18T12:22:16.395043784Z | stdout | delegate = Delegate(library, options) |
2022-07-18T12:22:16.394961089Z | stdout | File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate |
2022-07-18T12:22:16.394769317Z | stdout | Traceback (most recent call last): |
2022-07-18T12:22:16.392729930Z | stdout | Process detector:coral: |
2022-07-18T12:22:16.391974070Z | stdout | [2022-07-18 20:22:16] frigate.edgetpu ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors. |
2022-07-18T12:21:52.945388524Z | stdout | [2022-07-18 20:21:52] ws4py INFO : Using epoll |
2022-07-18T12:21:51.345216081Z | stdout | [2022-07-18 20:21:51] frigate.app INFO : Capture process started for ketingcamera: 226 |
2022-07-18T12:21:51.331934375Z | stdout | [2022-07-18 20:21:51] frigate.edgetpu INFO : Attempting to load TPU as usb |
2022-07-18T12:21:51.326890153Z | stdout | [2022-07-18 20:21:51] frigate.mqtt INFO : Turning off detection for ketingcamera via mqtt |
2022-07-18T12:21:51.325877437Z | stdout | [2022-07-18 20:21:51] frigate.mqtt INFO : Turning off snapshots for ketingcamera via mqtt |
2022-07-18T12:21:51.321020467Z | stdout | [2022-07-18 20:21:51] frigate.app INFO : Capture process started for fristcamera: 224 |
2022-07-18T12:21:51.310108700Z | stdout | [2022-07-18 20:21:51] frigate.app INFO : Camera processor started for ketingcamera: 222 |
2022-07-18T12:21:51.309269569Z | stdout | [2022-07-18 20:21:51] frigate.app INFO : Camera processor started for fristcamera: 219 |
2022-07-18T12:21:51.301410155Z | stdout | [2022-07-18 20:21:51] ws4py INFO : Using epoll |
2022-07-18T12:21:51.292418509Z | stdout | [2022-07-18 20:21:51] detector.coral INFO : Starting detection process: 215 |
2022-07-18T12:21:51.290184145Z | stdout | [2022-07-18 20:21:51] frigate.app INFO : Output process started: 216 |
2022-07-18T12:21:51.259252397Z | stdout | [2022-07-18 20:21:51] peewee_migrate INFO : There is nothing to migrate |
2022-07-18T12:21:51.259009845Z | stdout | There is nothing to migrate |
2022-07-18T12:21:51.248469221Z | stdout | [2022-07-18 20:21:51] peewee_migrate INFO : Starting migrations |
2022-07-18T12:21:51.248279605Z | stdout | Starting migrations |
2022-07-18T12:21:51.242666058Z | stdout | [2022-07-18 20:21:51] frigate.app INFO : Creating directory: /tmp/cache |
2022-07-18T12:21:51.144849602Z | stdout | [2022-07-18 20:21:51] frigate.app INFO : Starting Frigate (0.11.0-ef54cd6) |
2022-07-18T12:21:42.014667319Z | stdout | [services.d] done. |
2022-07-18T12:21:42.001176376Z | stdout | [services.d] starting services |
2022-07-18T12:21:42.000211683Z | stdout | [cont-init.d] done. |
2022-07-18T12:21:41.999217422Z | stdout | [cont-init.d] executing container initialization scripts... |
2022-07-18T12:21:41.997972996Z | stdout | [fix-attrs.d] done. |
2022-07-18T12:21:41.997038335Z | stdout | [fix-attrs.d] applying ownership & permissions fixes... |
2022-07-18T12:21:41.995458059Z | stdout | [s6-init] ensuring user provided files have correct perms...exited 0. |
2022-07-18T12:21:41.870074330Z | stdout | [s6-init] making user provided files available at /var/run/s6/etc...exited 0. |
Guys, do you have any ideas why Synology Surveillance Station with Deepstack and SynoAI uses 20% CPU, but Frigate with CPU detection uses 80% CPU? I understand that Coral is preferable to use with Frigate. But SSS do the same job with CPU detection and 4 times less utilisation...
Not really an issue but rather a question:
Do you think hardware acceleration would work with the m2 version of the coral
https://www.coral.ai/products/m2-accelerator-ae
and my DS920+ which has 2 m2 slots?
I tried to spin this up today using frigate 0.13.1 and had issues with some base dependencies. Specifically while building libusb-1.0-0 I got:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.31-13+deb11u7) but 2.36-9+deb12u3 is to be installed
Depends: libc-dev-bin (= 2.31-13+deb11u7) but it is not going to be installed
As a work around I just changed the builder image to be Debian bookworm, and everything else worked as expected.
Hi,
I'm trying to run Frigate on a RS422+ using this. I've set up the coral TPU in the serial port and think its being recognised:
lsusb |__usb1 1d6b:0002:0404 09 2.00 480MBit/s 0mA 1IF (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:05:00.3) hub |__1-1 f400:f400:0100 00 2.00 480MBit/s 200mA 1IF (Synology DiskStation 7F00238D1C1A2E27) |__usb2 1d6b:0003:0404 09 3.00 5000MBit/s 0mA 1IF (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:05:00.3) hub |__2-2 1a6e:089a:0100 00 3.10 5000MBit/s 896mA 1IF ( ffffffd1ffffffb2ffffffdbffffffad)
I'm using the docker-compose file exactly as shown and set up the config file as:
mqtt:
enabled: False
cameras:
Front_Door:
enabled: True
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_CAMERA_1_RTSP_CREDENTIALS}@192.168.40.11:554/rtsp
roles:
- detect
The indentation is fine - it just isn't showing here.
I'm getting an error on startup though
`
date | stream | content |
---|---|---|
2024/02/08 14:19:56 | stdout | [s6-finish] sending all processes the KILL signal and exiting. |
2024/02/08 14:19:53 | stdout | [s6-finish] sending all processes the TERM signal. |
2024/02/08 14:19:53 | stdout | [s6-finish] waiting for services. |
2024/02/08 14:19:53 | stdout | [cont-finish.d] done. |
2024/02/08 14:19:53 | stdout | [cont-finish.d] executing container finish scripts... |
2024/02/08 14:19:53 | stdout | [cmd] python3 exited 1 |
2024/02/08 14:19:52 | stdout | ************************************************************* |
2024/02/08 14:19:52 | stdout | *** End Config Validation Errors *** |
2024/02/08 14:19:52 | stdout | ************************************************************* |
2024/02/08 14:19:52 | stdout | |
2024/02/08 14:19:52 | stdout | extra fields not permitted (type=value_error.extra) |
2024/02/08 14:19:52 | stdout | cameras -> Front_Door -> enabled |
2024/02/08 14:19:52 | stdout | extra fields not permitted (type=value_error.extra) |
2024/02/08 14:19:52 | stdout | mqtt -> enabled |
2024/02/08 14:19:52 | stdout | field required (type=value_error.missing) |
2024/02/08 14:19:52 | stdout | mqtt -> host |
2024/02/08 14:19:52 | stdout | pydantic.error_wrappers.ValidationError: 3 validation errors for FrigateConfig |
2024/02/08 14:19:52 | stdout | File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init |
2024/02/08 14:19:52 | stdout | File "pydantic/main.py", line 521, in pydantic.main.BaseModel.parse_obj |
2024/02/08 14:19:52 | stdout | return cls.parse_obj(config) |
2024/02/08 14:19:52 | stdout | File "/opt/frigate/frigate/config.py", line 942, in parse_file |
2024/02/08 14:19:52 | stdout | user_config = FrigateConfig.parse_file(config_file) |
2024/02/08 14:19:52 | stdout | File "/opt/frigate/frigate/app.py", line 82, in init_config |
2024/02/08 14:19:52 | stdout | self.init_config() |
2024/02/08 14:19:52 | stdout | File "/opt/frigate/frigate/app.py", line 332, in start |
2024/02/08 14:19:52 | stdout | Traceback (most recent call last): |
2024/02/08 14:19:52 | stdout | extra fields not permitted (type=value_error.extra) |
2024/02/08 14:19:52 | stdout | cameras -> Front_Door -> enabled |
2024/02/08 14:19:52 | stdout | extra fields not permitted (type=value_error.extra) |
2024/02/08 14:19:52 | stdout | mqtt -> enabled |
2024/02/08 14:19:52 | stdout | field required (type=value_error.missing) |
2024/02/08 14:19:52 | stdout | mqtt -> host |
2024/02/08 14:19:52 | stdout | 3 validation errors for FrigateConfig |
2024/02/08 14:19:52 | stdout | ************************************************************* |
2024/02/08 14:19:52 | stdout | *** Config Validation Errors *** |
2024/02/08 14:19:52 | stdout | ************************************************************* |
2024/02/08 14:19:52 | stdout | ************************************************************* |
2024/02/08 14:19:52 | stdout | *** https://docs.frigate.video/configuration/index *** |
2024/02/08 14:19:52 | stdout | *** Please check the docs at *** |
2024/02/08 14:19:52 | stdout | *** Your config file is not valid! *** |
2024/02/08 14:19:52 | stdout | ************************************************************* |
2024/02/08 14:19:52 | stdout | ************************************************************* |
`
but I really can't see any errors in the config file!
Hi,
thanks for your work.
Is there a way to have the latest frigate version compatible with HA ?
Enregistreur: custom_components.frigate
Source: custom_components/frigate/__init__.py:201
intégration: Frigate ([documentation](https://github.com/blakeblackshear/frigate), [problèmes](https://github.com/blakeblackshear/frigate-hass-integration/issues))
S'est produit pour la première fois: 07:31:28 (4 occurrences)
Dernier enregistrement: 07:33:19
Using a Frigate server (http://192.168.1.30:6545/) with version 0.11.1-2eada21 <= 0.12.1 which is not compatible -- you must upgrade: https://github.com/blakeblackshear/frigate/releases
Using a Frigate server (http://192.168.1.30:6545) with version 0.11.1-2eada21 <= 0.12.1 which is not compatible -- you must upgrade: https://github.com/blakeblackshear/frigate/releases
Thanks
Hello, is there any way to use dev board in synology. I really can't buy Google coral USB.
The Frigate 0.12 release is out for a while now, would be great to bump this repo as well!
I get this error on the frigate log. I'm using hwaccel_args: preset-vaapi. Do you know how to solve this? If I remove the hwacc it works, but I can't use hwacc indeed. Seems synology is blocking reading the gpu stats.
Would be great if you update it to 0.12.1 - Thanks
When can 0.12.0 be updated
I've been running Frigate as a Home assistant addon for some time and it is excellent. Unfortunately, the CPU overhead is an issue so thought I'd look to run it elsewhere and came across your work.
I'm a complete docker novice though!
I have a Synology NAS but don't know if it has GIT. How do I find out?
I made the assumption that it doesn't and carried out step 2 and got this:
So I assume that worked but I can't find the docker-compose.yml file on the NAS.
Where should it be?
Step 3 says to create the secrets.env file. Where on the NAS should it be it be saved?
Do I need a FRIGATE_CAMERA_2_RTSP_CREDENTIALS=my-camera-2-username:my-camera-2-password
for each camera that I have?
I already have an extensive config file from running Frigate as a Home Assistant addon. Will this work in docker too?
What will I need to change as per step 5.
Many thanks for any help.
Ash
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.