From 1cedf7955690472d5eabbb250516163e2e10ad8c Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 24 Jun 2025 12:28:40 -0500 Subject: [PATCH] preload modules --- frigate/__main__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frigate/__main__.py b/frigate/__main__.py index 512b2e5fd..f3181e494 100644 --- a/frigate/__main__.py +++ b/frigate/__main__.py @@ -118,5 +118,19 @@ def main() -> None: if __name__ == "__main__": + mp.set_forkserver_preload( + [ + # Standard library and core dependencies + "sqlite3", + # Third-party libraries commonly used in Frigate + "numpy", + "cv2", + "peewee", + "zmq", + "ruamel.yaml", + # Frigate core modules + "frigate.camera.maintainer", + ] + ) mp.set_start_method("forkserver", force=True) main()