From eeecaf442a9902f10514d0813c923d726c379c81 Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:35:41 +0300 Subject: [PATCH] docs(README.md): add guide for nix and nixos (#980) Co-authored-by: LostRuins Concedo <39025047+LostRuins@users.noreply.github.com> --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 645d2b76d..ec83cddcb 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,12 @@ when you can't use the precompiled binary directly, we provide an automated buil - These unofficial resources have been contributed by the community, and may be outdated or unmaintained. No official support will be provided for them! - Arch Linux Packages: [CUBLAS](https://aur.archlinux.org/packages/koboldcpp-cuda), and [HIPBLAS](https://aur.archlinux.org/packages/koboldcpp-hipblas). - Unofficial Dockers: [korewaChino](https://github.com/korewaChino/koboldCppDocker) and [noneabove1182](https://github.com/noneabove1182/koboldcpp-docker) + - Nix & NixOS: KoboldCpp is available on Nixpkgs and can be installed by adding just `koboldcpp` to your `environment.systemPackages`. + - Make sure to have `nixpkgs.config.allowUnfree`, `hardware.opengl.enable` *(`hardware.graphics.enable` if you're using unstable channel)* and `nixpkgs.config.cudaSupport` set to `true` to enable CUDA. + - Metal is enabled by default on macOS, Vulkan support is enabled by default on both Linux and macOS, ROCm support isn't available yet. + - You can also use `nix3-run` to use KoboldCpp: `nix run --expr ``with import { config = { allowUnfree = true; cudaSupport = true; }; }; koboldcpp`` --impure` + - Or use `nix-shell`: `nix-shell --expr 'with import { config = { allowUnfree = true; cudaSupport = true; }; }; koboldcpp' --run "koboldcpp" --impure` + - Packages (like OpenBlast, CLBLast, Vulkan, etc.) can be overridden, please refer to the [17th Nix Pill - Nixpkgs Overriding Packages](https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages) ## Questions and Help Wiki - **First, please check out [The KoboldCpp FAQ and Knowledgebase](https://github.com/LostRuins/koboldcpp/wiki) which may already have answers to your questions! Also please search through past issues and discussions.**