mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 19:34:06 +00:00
ollama: add overridden versions to all-packages.nix
This should be able to enable atomatic nix caching for these versions of ollama.
This commit is contained in:
parent
698c1d1aeb
commit
d76cd9352c
@ -7,9 +7,7 @@
|
||||
, overrideCC
|
||||
, makeWrapper
|
||||
, stdenv
|
||||
, nixosTests
|
||||
|
||||
, pkgs
|
||||
, cmake
|
||||
, gcc12
|
||||
, clblast
|
||||
@ -19,8 +17,11 @@
|
||||
, linuxPackages
|
||||
, darwin
|
||||
|
||||
, nixosTests
|
||||
, testers
|
||||
, ollama
|
||||
, ollama-rocm
|
||||
, ollama-cuda
|
||||
|
||||
, config
|
||||
# one of `[ null false "rocm" "cuda" ]`
|
||||
@ -198,20 +199,24 @@ goBuild ((lib.optionalAttrs enableRocm {
|
||||
|
||||
passthru.tests = {
|
||||
service = nixosTests.ollama;
|
||||
rocm = pkgs.ollama.override { acceleration = "rocm"; };
|
||||
cuda = pkgs.ollama.override { acceleration = "cuda"; };
|
||||
version = testers.testVersion {
|
||||
inherit version;
|
||||
package = ollama;
|
||||
};
|
||||
} // stdenv.isLinux {
|
||||
inherit ollama-rocm ollama-cuda;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Get up and running with large language models locally";
|
||||
description = "Get up and running with large language models locally"
|
||||
+ lib.optionalString enableRocm ", using ROCm for AMD GPU acceleration"
|
||||
+ lib.optionalString enableCuda ", using CUDA for NVIDIA GPU acceleration";
|
||||
homepage = "https://github.com/ollama/ollama";
|
||||
changelog = "https://github.com/ollama/ollama/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
platforms =
|
||||
if (enableRocm || enableCuda) then platforms.linux
|
||||
else platforms.unix;
|
||||
mainProgram = "ollama";
|
||||
maintainers = with maintainers; [ abysssol dit7ya elohmeier roydubnium ];
|
||||
};
|
||||
|
@ -812,6 +812,9 @@ with pkgs;
|
||||
|
||||
oletools = with python3.pkgs; toPythonApplication oletools;
|
||||
|
||||
ollama-rocm = callPackage ../by-name/ol/ollama/package.nix { acceleration = "rocm"; };
|
||||
ollama-cuda = callPackage ../by-name/ol/ollama/package.nix { acceleration = "cuda"; };
|
||||
|
||||
ots = callPackage ../tools/security/ots { };
|
||||
|
||||
credential-detector = callPackage ../tools/security/credential-detector { };
|
||||
|
Loading…
Reference in New Issue
Block a user