mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-30 13:48:07 +02:00
Merge remote-tracking branch 'origin/master' into dev
This commit is contained in:
commit
a1048654ee
@ -46,6 +46,17 @@ Some users have reported that this older device runs an older kernel causing iss
|
|||||||
6. Open the control panel - info scree. The coral TPU will now be recognised as a USB Device - google inc
|
6. Open the control panel - info scree. The coral TPU will now be recognised as a USB Device - google inc
|
||||||
7. Start the frigate container. Everything should work now!
|
7. Start the frigate container. Everything should work now!
|
||||||
|
|
||||||
|
### QNAP NAS
|
||||||
|
|
||||||
|
QNAP NAS devices, such as the TS-253A, may use connected Coral TPU devices if [QuMagie](https://www.qnap.com/en/software/qumagie) is installed along with its QNAP AI Core extension. If any of the features—`facial recognition`, `object recognition`, or `similar photo recognition`—are enabled, Container Station applications such as `Frigate` or `CodeProject.AI Server` will be unable to initialize the TPU device in use.
|
||||||
|
To allow the Coral TPU device to be discovered, the you must either:
|
||||||
|
|
||||||
|
1. [Disable the AI recognition features in QuMagie](https://docs.qnap.com/application/qumagie/2.x/en-us/configuring-qnap-ai-core-settings-FB13CE03.html),
|
||||||
|
2. Remove the QNAP AI Core extension or
|
||||||
|
3. Manually start the QNAP AI Core extension after Frigate has fully started (not recommended).
|
||||||
|
|
||||||
|
It is also recommended to restart the NAS once the changes have been made.
|
||||||
|
|
||||||
## USB Coral Detection Appears to be Stuck
|
## USB Coral Detection Appears to be Stuck
|
||||||
|
|
||||||
The USB Coral can become stuck and need to be restarted, this can happen for a number of reasons depending on hardware and software setup. Some common reasons are:
|
The USB Coral can become stuck and need to be restarted, this can happen for a number of reasons depending on hardware and software setup. Some common reasons are:
|
||||||
|
@ -73,6 +73,7 @@ from frigate.track.object_processing import TrackedObjectProcessor
|
|||||||
from frigate.util.builtin import empty_and_close_queue
|
from frigate.util.builtin import empty_and_close_queue
|
||||||
from frigate.util.image import SharedMemoryFrameManager, UntrackedSharedMemory
|
from frigate.util.image import SharedMemoryFrameManager, UntrackedSharedMemory
|
||||||
from frigate.util.object import get_camera_regions_grid
|
from frigate.util.object import get_camera_regions_grid
|
||||||
|
from frigate.util.services import set_file_limit
|
||||||
from frigate.version import VERSION
|
from frigate.version import VERSION
|
||||||
from frigate.video import capture_camera, track_camera
|
from frigate.video import capture_camera, track_camera
|
||||||
from frigate.watchdog import FrigateWatchdog
|
from frigate.watchdog import FrigateWatchdog
|
||||||
@ -632,6 +633,9 @@ class FrigateApp:
|
|||||||
# Ensure global state.
|
# Ensure global state.
|
||||||
self.ensure_dirs()
|
self.ensure_dirs()
|
||||||
|
|
||||||
|
# Set soft file limits.
|
||||||
|
set_file_limit()
|
||||||
|
|
||||||
# Start frigate services.
|
# Start frigate services.
|
||||||
self.init_camera_metrics()
|
self.init_camera_metrics()
|
||||||
self.init_queues()
|
self.init_queues()
|
||||||
|
@ -5,6 +5,7 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import resource
|
||||||
import signal
|
import signal
|
||||||
import subprocess as sp
|
import subprocess as sp
|
||||||
import traceback
|
import traceback
|
||||||
@ -751,3 +752,19 @@ def process_logs(
|
|||||||
log_lines.append(dedup_message)
|
log_lines.append(dedup_message)
|
||||||
|
|
||||||
return len(log_lines), log_lines[start:end]
|
return len(log_lines), log_lines[start:end]
|
||||||
|
|
||||||
|
|
||||||
|
def set_file_limit() -> None:
|
||||||
|
# Newer versions of containerd 2.X+ impose a very low soft file limit of 1024
|
||||||
|
# This applies to OSs like HA OS (see https://github.com/home-assistant/operating-system/issues/4110)
|
||||||
|
# Attempt to increase this limit
|
||||||
|
soft_limit = int(os.getenv("SOFT_FILE_LIMIT", "65536") or "65536")
|
||||||
|
|
||||||
|
current_soft, current_hard = resource.getrlimit(resource.RLIMIT_NOFILE)
|
||||||
|
logger.debug(f"Current file limits - Soft: {current_soft}, Hard: {current_hard}")
|
||||||
|
|
||||||
|
new_soft = min(soft_limit, current_hard)
|
||||||
|
resource.setrlimit(resource.RLIMIT_NOFILE, (new_soft, current_hard))
|
||||||
|
logger.debug(
|
||||||
|
f"File limit set. New soft limit: {new_soft}, Hard limit remains: {current_hard}"
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user