Skip to content

Conversation

@SomeoneSerge
Copy link
Collaborator

@SomeoneSerge SomeoneSerge commented Dec 25, 2023

Following up on #4605. "Flake-parts" is a way to build Nix "flakes" declaratively, using the same "module system" (evalModules) mechanism as used by the NixOS. In short though, it's just a system for merging and validating dictionaries.

The motivation is just to have the llama-cpp's flake look possibly up-to-date and use relatively common practices, since it's quite visible and we should anticipate that people might copy-paste things from here...

philiptaron and others added 11 commits December 23, 2023 23:51
1. Split into separate files per output.

2. Added overlays, so that this flake can be integrated into others.
   The names in the overlay are `llama-cpp`, `llama-cpp-opencl`,
   `llama-cpp-cuda`, and `llama-cpp-rocm` so that they fit into the
   broader set of Nix packages from [nixpkgs](https://github.com/nixos/nixpkgs).

3. Use [callPackage](https://summer.nixos.org/blog/callpackage-a-tool-for-the-lazy/)
   rather than `with pkgs;` so that there's dependency injection rather
   than dependency lookup.

4. Add a description and meta information for each package.
   The description includes a bit about what's trying to accelerate each one.

5. Use specific CUDA packages instead of cudatoolkit on the advice of @SomeoneSerge.

6. Format with `serokell/nixfmt` for a consistent style.

7. Update `flake.lock` with the latest goods.
nix shell github:piegamesde/nixfmt/rfc101-style --command \
    nixfmt flake.nix .devops/nix/*.nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants