NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Fix build (#19634)
Nicolas Mowen9fb09408d1d2
diff --git a/docker/rockchip/Dockerfile b/docker/rockchip/Dockerfileindex 6682504393..70309f02ed 100644--- a/docker/rockchip/Dockerfile+++ b/docker/rockchip/Dockerfile@@ -11,7 +11,8 @@ COPY docker/main/requirements-wheels.txt /requirements-wheels.txtCOPY docker/rockchip/requirements-wheels-rk.txt /requirements-wheels-rk.txtRUN sed -i "/https:\/\//d" /requirements-wheels.txtRUN sed -i "/onnxruntime/d" /requirements-wheels.txt-RUN pip3 wheel --wheel-dir=/rk-wheels -c /requirements-wheels.txt -r /requirements-wheels-rk.txt+RUN sed -i '/\[.*\]/d' /requirements-wheels.txt \+ && pip3 wheel --wheel-dir=/rk-wheels -c /requirements-wheels.txt -r /requirements-wheels-rk.txtRUN rm -rf /rk-wheels/opencv_python-*RUN rm -rf /rk-wheels/torch-*diff --git a/docker/tensorrt/Dockerfile.amd64 b/docker/tensorrt/Dockerfile.amd64index 906e113a88..cbbb28bb65 100644--- a/docker/tensorrt/Dockerfile.amd64+++ b/docker/tensorrt/Dockerfile.amd64@@ -12,7 +12,10 @@ ARG PIP_BREAK_SYSTEM_PACKAGES# Install TensorRT wheelsCOPY docker/tensorrt/requirements-amd64.txt /requirements-tensorrt.txtCOPY docker/main/requirements-wheels.txt /requirements-wheels.txt-RUN pip3 wheel --wheel-dir=/trt-wheels -c /requirements-wheels.txt -r /requirements-tensorrt.txt++# remove dependencies from the requirements that have type constraints+RUN sed -i '/\[.*\]/d' /requirements-wheels.txt \+ && pip3 wheel --wheel-dir=/trt-wheels -c /requirements-wheels.txt -r /requirements-tensorrt.txtFROM deps AS frigate-tensorrtARG PIP_BREAK_SYSTEM_PACKAGESdiff --git a/frigate/api/fastapi_app.py b/frigate/api/fastapi_app.pyindex 1265f3af95..d56f6919d7 100644--- a/frigate/api/fastapi_app.py+++ b/frigate/api/fastapi_app.py@@ -1,8 +1,10 @@import logging+import refrom typing import Optionalfrom fastapi import FastAPI, Requestfrom fastapi.responses import JSONResponse+from joserfc.jwk import OctKeyfrom playhouse.sqliteq import SqliteQueueDatabasefrom slowapi import _rate_limit_exceeded_handlerfrom slowapi.errors import RateLimitExceeded@@ -130,6 +132,26 @@ def create_fastapi_app(app.stats_emitter = stats_emitterapp.event_metadata_updater = event_metadata_updaterapp.config_publisher = config_publisher- app.jwt_token = get_jwt_secret() if frigate_config.auth.enabled else None++ if frigate_config.auth.enabled:+ secret = get_jwt_secret()+ key_bytes = None+ if isinstance(secret, str):+ # If the secret looks like hex (e.g., generated by secrets.token_hex), use raw bytes+ if len(secret) % 2 == 0 and re.fullmatch(r"[0-9a-fA-F]+", secret or ""):+ try:+ key_bytes = bytes.fromhex(secret)+ except ValueError:+ key_bytes = secret.encode("utf-8")+ else:+ key_bytes = secret.encode("utf-8")+ elif isinstance(secret, (bytes, bytearray)):+ key_bytes = bytes(secret)+ else:+ key_bytes = str(secret).encode("utf-8")++ app.jwt_token = OctKey.import_key(key_bytes)+ else:+ app.jwt_token = Nonereturn app