| 21 Nov 2024 |
@hexa:lossy.network | 41: edge_tpu_delegate = load_delegate("/nix/store/fvjzhbpnvdfn00ngw53nyc9qngkh5j5m-libedgetpu-0-unstable-2024-03-14/lib/libedgetpu.so.1.0", device_config)
| 00:39:19 |
@hexa:lossy.network | which looks pretty solid to me | 00:39:26 |
@hexa:lossy.network | did the service get restarted? | 00:39:57 |
netpleb | In reply to @hexa:lossy.network which looks pretty solid to me yes, that looks solid. So somehow there is a difference between your PR and me overriding the package locally. Is it possible that the frigate package does not respect the patching process? | 00:40:22 |
@hexa:lossy.network | ohhhhh | 00:40:36 |
@hexa:lossy.network | my bad | 00:40:38 |
@hexa:lossy.network | instead of overrideAttrs use overridePythonAttrs | 00:40:46 |
netpleb | In reply to @hexa:lossy.network instead of overrideAttrs use overridePythonAttrs ok, updated and tried it. Still getting the same error which makes me think the patch is still not applying somehow. I also got this on my redeploy: warning: The interpretation of store paths arguments ending in .drv recently changed. If this command is now failing try again with '/nix/store/d0qg4fms4bmwmp2jz2padxpj9pycqx34-nixos-system-aleph0-25.05.20241115.5e4fbfb.drv^*' | 00:44:11 |
@hexa:lossy.network | that warning is unrelated | 00:44:28 |
netpleb | In reply to @hexa:lossy.network your trace shows that the patch didn't get applied * strange.. could it be the or [ ] ++ [ ...? here is what I added to my config:
# override the frigate package to include our patch (necessary for coral usb tpu)
package = pkgs.frigate.overridePythonAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(pkgs.substituteAll {
src = ./patches/libedgetpu.patch;
libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
})
];
});
| 00:45:11 |
netpleb | In reply to @hexa:lossy.network instead of overrideAttrs use overridePythonAttrs all I changed was this | 00:45:49 |
@hexa:lossy.network | did this result in a package rebuild? | 00:45:59 |
netpleb | In reply to @hexa:lossy.network instead of overrideAttrs use overridePythonAttrs * all I changed was this (edited above in the chat too for consistency) | 00:46:03 |
netpleb | In reply to @hexa:lossy.network did this result in a package rebuild? not sure about the package rebuild, but it did result in a restart of the frigate service | 00:46:29 |
@hexa:lossy.network | uh, looks like I might have broken overrides | 00:46:56 |
@hexa:lossy.network | my bad | 00:47:00 |
@hexa:lossy.network | pythonPath =(python.pkgs.makePythonPath propagatedBuildInputs) + ":${frigate}/${python.sitePackages}";
| 00:47:13 |
@hexa:lossy.network | the frigate consumed here remains unpatched | 00:47:19 |
netpleb | well, if it helps, I am learning a lot by you doing this...despite having a flakes based nixos system as my primary system for a while, i never really figured out overlays properly | 00:48:16 |
netpleb | and patches for that matter | 00:48:20 |
@hexa:lossy.network | { lib, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
frigate = super.frigate.overridePythonAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(pkgs.substituteAll {
src = ./libedgetpu.patch;
libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
})
];
});
}) ];
}
| 00:48:54 |
@hexa:lossy.network | * { lib, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
frigate = super.frigate.overridePythonAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(pkgs.substituteAll {
src = ./libedgetpu.patch;
libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
})
];
});
}) ];
}
| 00:48:59 |
@hexa:lossy.network | and overlay should work 🫣 | 00:49:06 |
@hexa:lossy.network | * { lib, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
frigate = super.frigate.overridePythonAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(pkgs.substituteAll {
src = ./libedgetpu.patch;
libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
})
];
});
})
];
}
| 00:49:41 |
netpleb | In reply to @hexa:lossy.network
{ lib, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
frigate = super.frigate.overridePythonAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(pkgs.substituteAll {
src = ./libedgetpu.patch;
libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
})
];
});
})
];
}
ok, so I get rid of my services.frigate.package = ... and instead add the above? | 00:49:45 |
@hexa:lossy.network | yes | 00:49:49 |
@hexa:lossy.network | maybe I messed up the brackets, not sure | 00:49:57 |
netpleb | In reply to @hexa:lossy.network maybe I messed up the brackets, not sure I can fix that part usually ;) | 00:50:13 |
netpleb | it is rebuilding the frigate package now! | 00:52:04 |
netpleb | well, we were so close!
Nov 20 16:52:26 aleph0 frigate[10493]: Process detector:coral:
Nov 20 16:52:26 aleph0 frigate[10446]: [2024-11-20 16:52:26] frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
Nov 20 16:52:26 aleph0 frigate[10493]: Traceback (most recent call last):
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/y7wsnapb7w8pqkifah4v7s271n30d84z-python3.12-tensorflow-2.18.0/lib/python3.12/site-packages/tensorflow/lite/python/interpreter.py", line 166, in load_delegate
Nov 20 16:52:26 aleph0 frigate[10493]: delegate = Delegate(library, options)
Nov 20 16:52:26 aleph0 frigate[10493]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/y7wsnapb7w8pqkifah4v7s271n30d84z-python3.12-tensorflow-2.18.0/lib/python3.12/site-packages/tensorflow/lite/python/interpreter.py", line 104, in __init__
Nov 20 16:52:26 aleph0 frigate[10493]: raise ValueError(capture.message)
Nov 20 16:52:26 aleph0 frigate[10493]: ValueError
Nov 20 16:52:26 aleph0 frigate[10493]: During handling of the above exception, another exception occurred:
Nov 20 16:52:26 aleph0 frigate[10493]: Traceback (most recent call last):
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/px2nj16i5gc3d4mnw5l1nclfdxhry61p-python3-3.12.7/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
Nov 20 16:52:26 aleph0 frigate[10493]: self.run()
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/px2nj16i5gc3d4mnw5l1nclfdxhry61p-python3-3.12.7/lib/python3.12/multiprocessing/process.py", line 108, in run
Nov 20 16:52:26 aleph0 frigate[10493]: self._target(*self._args, **self._kwargs)
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/p49rj7jjwy759rw3dv2x9a88gs2vqggy-frigate-0.14.1/lib/python3.12/site-packages/frigate/object_detection.py", line 102, in run_detector
Nov 20 16:52:26 aleph0 frigate[10493]: object_detector = LocalObjectDetector(detector_config=detector_config)
Nov 20 16:52:26 aleph0 frigate[10493]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/p49rj7jjwy759rw3dv2x9a88gs2vqggy-frigate-0.14.1/lib/python3.12/site-packages/frigate/object_detection.py", line 53, in __init__
Nov 20 16:52:26 aleph0 frigate[10493]: self.detect_api = create_detector(detector_config)
Nov 20 16:52:26 aleph0 frigate[10493]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/p49rj7jjwy759rw3dv2x9a88gs2vqggy-frigate-0.14.1/lib/python3.12/site-packages/frigate/detectors/__init__.py", line 18, in create_detector
Nov 20 16:52:26 aleph0 frigate[10493]: return api(detector_config)
Nov 20 16:52:26 aleph0 frigate[10493]: ^^^^^^^^^^^^^^^^^^^^
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/p49rj7jjwy759rw3dv2x9a88gs2vqggy-frigate-0.14.1/lib/python3.12/site-packages/frigate/detectors/plugins/edgetpu_tfl.py", line 41, in __init__
Nov 20 16:52:26 aleph0 frigate[10493]: edge_tpu_delegate = load_delegate("/nix/store/fvjzhbpnvdfn00ngw53nyc9qngkh5j5m-libedgetpu-0-unstable-2024-03-14/lib/libedgetpu.so.1.0", device_config)
Nov 20 16:52:26 aleph0 frigate[10493]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 20 16:52:26 aleph0 frigate[10493]: File "/nix/store/y7wsnapb7w8pqkifah4v7s271n30d84z-python3.12-tensorflow-2.18.0/lib/python3.12/site-packages/tensorflow/lite/python/interpreter.py", line 168, in load_delegate
Nov 20 16:52:26 aleph0 frigate[10493]: raise ValueError('Failed to load delegate from {}\n{}'.format(
Nov 20 16:52:26 aleph0 frigate[10493]: ValueError: Failed to load delegate from /nix/store/fvjzhbpnvdfn00ngw53nyc9qngkh5j5m-libedgetpu-0-unstable-2024-03-14/lib/libedgetpu.so.1.0
Nov 20 16:52:31 aleph0 frigate[10446]: [2024-11-20 16:52:31] frigate.watchdog INFO : Detection appears to have stopped. Exiting Frigate...
| 00:54:12 |