| 20 Nov 2024 |
@hexa:lossy.network | apyh: indeed, the module does not provide any option to pass a secrets file. Would probably do it with a tmpfiles rule to create a symlink from /var/lib/hass/secrets.yaml to where my secrets were decrypted at, e.g. /run/agenix/hass-secrets.yaml | 12:12:09 |
mjm | that’s exactly how I do it | 14:17:38 |
@hexa:lossy.network | feel free to send a PR with an option for that | 14:54:34 |
@hexa:lossy.network | secretsFile | 14:54:41 |
| netpleb joined the room. | 23:38:31 |
netpleb | In reply to @koen:procolix.com Feb 28 21:35:12 frigate python3.11[36370]: OSError: libedgetpu.so.1.0: cannot open shared object file: No such file or directory
better late than never -- did you ever resolve this issue? I am getting the same error when trying to get the frigate nixos module working with coral usb edgetpu | 23:45:50 |
@hexa:lossy.network | frigate/detectors/plugins/edgetpu_tfl.py
41: edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
| 23:50:09 |
@hexa:lossy.network | Is suspect you need to patch libedgetpu.so.1.0 with the absolute path to the library in nixpkgs | 23:50:37 |
netpleb | In reply to @hexa:lossy.network Is suspect you need to patch libedgetpu.so.1.0 with the absolute path to the library in nixpkgs uh oh, this is something I have never done before | 23:51:14 |
@hexa:lossy.network | hm ok | 23:51:30 |
netpleb | but I am happy and willing to try! so you're saying the issue is likely not with frigate and that simply putting environment.systemPackages = [ "libedgetpu" ]; in the config is not enough? | 23:52:34 |
@hexa:lossy.network | that will only put ${libedgetpu.out}/bin intO PATH | 23:53:05 |
@hexa:lossy.network | * that will only put ${libedgetpu.out}/bin into PATH | 23:53:07 |
netpleb | In reply to @hexa:lossy.network that will only put ${libedgetpu.out}/bin into PATH sorry, I am dumb when it comes to these things, please bear with me. So do I not even need to have libedgetpu included in environment.systemPackages at all? | 23:55:06 |
@hexa:lossy.network | load_delegate is a function provided by tensorflow that wants to load a shared library at runtime | 23:55:43 |
@hexa:lossy.network | but since nixos does not store libraries in easily discoverable paths like /usr/lib or similar, we need some patching | 23:56:13 |
netpleb | I see. That makes sense. So I need to apply the patch to frigate? (I'm using the nixos unstable module) | 23:57:32 |
@hexa:lossy.network | one minute | 23:57:51 |
@hexa:lossy.network | https://github.com/NixOS/nixpkgs/pull/357717 | 23:59:41 |
@hexa:lossy.network | untested | 23:59:48 |
| 21 Nov 2024 |
netpleb | In reply to @hexa:lossy.network https://github.com/NixOS/nixpkgs/pull/357717 whoa, you are amazing!!! ok I will test it and see what happens! | 00:01:14 |
netpleb | really dumb question -- when you test something like this, what is you usual method? I figured I would just change my nixpkgs input from nixos-unstable over to that PR branch you just published. That pretty much what you do? | 00:02:30 |
netpleb | sorry, maybe the better question is this: for home automation things, do you end up with multiple version of nixpkgs as inputs? Such as "nixpkgs-frigate" and "nixpkgs-home-assistant" so that you're able to bump along and pull in latest things? | 00:04:06 |
@hexa:lossy.network | I would probably override the package | 00:04:14 |
@hexa:lossy.network | https://search.nixos.org/options?channel=unstable&show=services.frigate.package&from=0&size=50&sort=relevance&type=packages&query=frigate.package | 00:04:47 |
@hexa:lossy.network | so this option defaults to pkgs.frigate | 00:04:52 |
@hexa:lossy.network | and you could in theory do the following | 00:04:59 |
@hexa:lossy.network | { lib, pkgs, ... }:
{
services.frigate.package = pkgs.frigate.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(substituteAll {
src = ./libedgetpu.patch;
libedgetpu = "${lib.getLib pkgs.libedgetpu}/lib/libedgetpu.so.1.0";
})
];
});
}
| 00:06:29 |
@hexa:lossy.network | and then drop the patch into the same directory | 00:06:47 |
netpleb | In reply to @hexa:lossy.network and then drop the patch into the same directory ok, I will try that, thanks! I have never done this type of patching. I presume I download the patch file from your github PR branch? | 00:08:36 |