mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-20 03:59:30 +03:00
tabby: add nvidia cuda support
This commit is contained in:
parent
a34ed79eaa
commit
cfec6d9203
@ -7016,6 +7016,15 @@
|
||||
github = "ghostbuster91";
|
||||
githubId = 5662622;
|
||||
};
|
||||
ghthor = {
|
||||
email = "ghthor@gmail.com";
|
||||
github = "ghthor";
|
||||
githubId = 160298;
|
||||
name = "Will Owens";
|
||||
keys = [{
|
||||
fingerprint = "8E98 BB01 BFF8 AEA4 E303 FC4C 8074 09C9 2CE2 3033";
|
||||
}];
|
||||
};
|
||||
ghuntley = {
|
||||
email = "ghuntley@ghuntley.com";
|
||||
github = "ghuntley";
|
||||
|
73
pkgs/by-name/ta/tabby/package.nix
Normal file
73
pkgs/by-name/ta/tabby/package.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, gcc12
|
||||
, cmake
|
||||
, git
|
||||
, openssl
|
||||
, pkg-config
|
||||
, protobuf
|
||||
, rustPlatform
|
||||
, addOpenGLRunpath
|
||||
, cudatoolkit
|
||||
, nvidia ? true
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
version = "0.6.0";
|
||||
pname = "tabby";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TabbyML";
|
||||
repo = "tabby";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-cZvfJMFsf7m8o5YKpsJpcrRmxJCQOFxrDzJZXMzVeFA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoHash = "sha256-iv8MpBfGGUFkjUZ9eAGq65vCy62VJQGTYIS0r9GRyfo=";
|
||||
|
||||
# https://github.com/TabbyML/tabby/blob/v0.6.0/Dockerfile#L40C5-L40C58
|
||||
cargoBuildFlags = [
|
||||
"--release"
|
||||
"--package" "tabby"
|
||||
] ++ lib.optional nvidia [
|
||||
"--features" "cuda"
|
||||
];
|
||||
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
protobuf
|
||||
git
|
||||
cmake
|
||||
gcc12
|
||||
|
||||
] ++ lib.optional nvidia [
|
||||
addOpenGLRunpath
|
||||
];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optional nvidia cudatoolkit
|
||||
;
|
||||
|
||||
postInstall = ''
|
||||
${if nvidia then ''
|
||||
addOpenGLRunpath "$out/bin/tabby"
|
||||
'' else ''
|
||||
''}
|
||||
'';
|
||||
|
||||
# Fails with:
|
||||
# file cannot create directory: /var/empty/local/lib64/cmake/Llama
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/TabbyML/tabby";
|
||||
changelog = "https://github.com/TabbyML/tabby/releases/tag/v${version}";
|
||||
description = "Self-hosted AI coding assistant";
|
||||
mainProgram = "tabby";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ghthor ];
|
||||
};
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, git
|
||||
, openssl
|
||||
, pkg-config
|
||||
, protobuf
|
||||
, rustPlatform
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
version = "0.6.0";
|
||||
pname = "tabby";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TabbyML";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-cZvfJMFsf7m8o5YKpsJpcrRmxJCQOFxrDzJZXMzVeFA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoHash = "sha256-iv8MpBfGGUFkjUZ9eAGq65vCy62VJQGTYIS0r9GRyfo=";
|
||||
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
nativeBuildInputs = [ pkg-config protobuf git cmake ];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
# Fails with:
|
||||
# file cannot create directory: /var/empty/local/lib64/cmake/Llama
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Self-hosted AI coding assistant";
|
||||
mainProgram = "tabby";
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.deshaw.members;
|
||||
};
|
||||
}
|
@ -6431,8 +6431,6 @@ with pkgs;
|
||||
|
||||
recyclarr = callPackage ../tools/video/recyclarr { };
|
||||
|
||||
tabby = callPackage ../development/tools/tabby { };
|
||||
|
||||
tsduck = callPackage ../tools/video/tsduck { };
|
||||
|
||||
turso-cli = callPackage ../development/tools/turso-cli {};
|
||||
|
Loading…
Reference in New Issue
Block a user