mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-07 00:41:50 +00:00
1.7 KiB
1.7 KiB
Guide to Nix for KoboldCpp
- KoboldCpp is available on Nixpkgs and can be installed by adding just
koboldcppto yourenvironment.systemPackages(or it can also be placed inhome.packages).
KoboldCpp Nix - CUDA Support
- In order to enable NVIDIA CUDA support, you will need to set
nixpkgs.config.allowUnfree,hardware.opengl.enable(hardware.graphics.enableif you're using 24.11 or the unstable channel) andnixpkgs.config.cudaSupporttotrue, and setnixpkgs.config.cudaArches(e.g., if you have an RTX 2080, you need to setcudaArchesto[ "sm_75" ]) to your GPU architecture. Find your architecture here: Matching CUDA arch and CUDA gencode for various NVIDIA architectures- Make sure to configure
nixpkgssettings again/separately for home-manager ifhome-manager.useGlobalPkgsis set tofalse. - Metal is enabled by default on macOS, Vulkan support is enabled by default on both Linux and macOS, ROCm support isn't available yet.
- Make sure to configure
Example KoboldCpp Nix Configuration
nixpkgs.config = {
allowUnfree = true;
cudaSupport = true;
cudaArches = [ "sm_75" ];
};
# NixOS 24.05
hardware.opengl.enable = true;
# NixOS 24.11 or unstable
# hardware.graphics.enable = true;
environment.systemPackages = [ pkgs.koboldcpp ];
# If you're using home-manager to install KoboldCpp
# home.packages = [ pkgs.koboldcpp ];
Getting Help for KoboldCpp Nix
- If you face any issues with running KoboldCpp on Nix, please open an issue here