nix: add `text-generation-benchmark` to pure devshell (#2431)
nix: add text-generation-benchmark to pure devshell
This commit is contained in:
parent
f5f11b797e
commit
9474415095
|
@ -43,6 +43,9 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
crateOverrides = import ./nix/crate-overrides.nix { inherit pkgs nix-filter; };
|
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 {
|
launcher = cargoNix.workspaceMembers.text-generation-launcher.build.override {
|
||||||
inherit crateOverrides;
|
inherit crateOverrides;
|
||||||
};
|
};
|
||||||
|
@ -57,6 +60,7 @@
|
||||||
|
|
||||||
pure = mkShell {
|
pure = mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
benchmark
|
||||||
launcher
|
launcher
|
||||||
router
|
router
|
||||||
server
|
server
|
||||||
|
|
|
@ -20,34 +20,52 @@ defaultCrateOverrides
|
||||||
rav1e = attrs: { env.CARGO_ENCODED_RUSTFLAGS = "-C target-feature=-crt-static"; };
|
rav1e = attrs: { env.CARGO_ENCODED_RUSTFLAGS = "-C target-feature=-crt-static"; };
|
||||||
|
|
||||||
grpc-metadata = attrs: {
|
grpc-metadata = attrs: {
|
||||||
src =
|
src = filter {
|
||||||
filter {
|
root = ../backends/grpc-metadata;
|
||||||
root = ../backends/grpc-metadata;
|
include = with filter; [
|
||||||
include = with filter; [
|
isDirectory
|
||||||
isDirectory
|
(matchExt "rs")
|
||||||
(matchExt "rs")
|
];
|
||||||
];
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
text-generation-launcer = attrs: {
|
text-generation-benchmark = attrs: {
|
||||||
src =
|
src = filter {
|
||||||
filter {
|
root = ../benchmark;
|
||||||
root = ../launcher;
|
include = with filter; [
|
||||||
include = with filter; [
|
isDirectory
|
||||||
isDirectory
|
(matchExt "rs")
|
||||||
(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
|
||||||
|
(matchExt "rs")
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
text-generation-router = attrs: {
|
text-generation-router = attrs: {
|
||||||
src =
|
src = filter {
|
||||||
filter {
|
root = ../router;
|
||||||
root = ../router;
|
include = with filter; [
|
||||||
include = with filter; [
|
isDirectory
|
||||||
isDirectory
|
(matchExt "rs")
|
||||||
(matchExt "rs")
|
];
|
||||||
];
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
text-generation-router-v3 = attrs: {
|
text-generation-router-v3 = attrs: {
|
||||||
# We need to do the src/source root dance so that the build
|
# We need to do the src/source root dance so that the build
|
||||||
|
|
Loading…
Reference in New Issue