nix: add `text-generation-benchmark` to pure devshell (#2431)

nix: add text-generation-benchmark to pure devshell
This commit is contained in:
Daniël de Kok 2024-08-21 07:48:13 +02:00 committed by GitHub
parent f5f11b797e
commit 9474415095
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 47 additions and 25 deletions

View File

@ -43,6 +43,9 @@
];
};
crateOverrides = import ./nix/crate-overrides.nix { inherit pkgs nix-filter; };
benchmark = cargoNix.workspaceMembers.text-generation-benchmark.build.override {
inherit crateOverrides;
};
launcher = cargoNix.workspaceMembers.text-generation-launcher.build.override {
inherit crateOverrides;
};
@ -57,6 +60,7 @@
pure = mkShell {
buildInputs = [
benchmark
launcher
router
server

View File

@ -20,8 +20,7 @@ defaultCrateOverrides
rav1e = attrs: { env.CARGO_ENCODED_RUSTFLAGS = "-C target-feature=-crt-static"; };
grpc-metadata = attrs: {
src =
filter {
src = filter {
root = ../backends/grpc-metadata;
include = with filter; [
isDirectory
@ -29,9 +28,29 @@ defaultCrateOverrides
];
};
};
text-generation-launcer = attrs: {
src =
filter {
text-generation-benchmark = attrs: {
src = filter {
root = ../benchmark;
include = with filter; [
isDirectory
(matchExt "rs")
];
};
};
text-generation-client = attrs: {
src = filter {
root = ../.;
include = with filter; [
isDirectory
(and (inDirectory "backends/client") (matchExt "rs"))
(and (inDirectory "proto") (matchExt "proto"))
];
};
postPatch = "cd backends/client";
buildInputs = [ protobuf ];
};
text-generation-launcher = attrs: {
src = filter {
root = ../launcher;
include = with filter; [
isDirectory
@ -40,8 +59,7 @@ defaultCrateOverrides
};
};
text-generation-router = attrs: {
src =
filter {
src = filter {
root = ../router;
include = with filter; [
isDirectory