-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add nix flake #9
Conversation
Co-authored-by: Carsten Kragelund <carsten@kragelund.me>
Co-authored-by: Carsten Kragelund <carsten@kragelund.me>
Would using onnxruntime 1.13.1 for now instead not work? The library doesn't rely on any 1.14+ features I believe |
I'll give using 1.13 a try. |
It builds successfully on x86_64-linux when I'm using nixos-unstable onnxruntime, but that breaks onnxruntime on aarch64-darwin. I don't have a x86_64-darwin machine to try to see if it works there. I guess we could use onnxruntime@1.13.1 on Linux, since it will use the cache, and the PR onnxruntime@1.14.1 on Darwin, but I don't know how wise that would be. I have subscribed to the 1.14.1 PR on nixpkgs and would be happy to maintain both flakes for this & LiveCaptions, eventually trying to upstream it to nixpkgs as well. |
It might be wiser to just stick to one working version then. How long do you think it would take for 1.14.1 to become available officially? Is it on the order of days, weeks, months? |
Hard to say, but I don't think within the next week, and it hitting the shared build cache could take longer. |
I suppose it needs to pull the 1.14.1 PR then. Let me know when this is ready for merge |
I have dropped the last commit using 1.13.1 - should be good to merge if you're happy with the CMakeLists changes. |
Thanks! |
Hi again!
This PR adds a Nix flake for this library, which would be used in the LiveCaptions Nix flake, so we can avoid using the
nix run ".?submodules=1"
parameter.I had to adjust some things in the
CMakeLists.txt
(specifying where the headers are built to) and addedaprilasr.pc.in
for pkg-config, so please review those on a regular Linux system.I'll make a second PR on LiveCaptions to consume this Flake.
Nix-related notes:
Since onnxruntime@1.14.1 isn't available on official nixpkgs yet, I had to do some patches to get the build to work. I'm pulling in NixOS/nixpkgs#226734 from its PR branch and handling a few errors that this PR introduces. We'd switch back to using
pkgs.onnxruntime
once that PR is merged, but this is the best way right now to use 1.14 like LiveCaptions requires.