nix: add router to the devshell

This commit is contained in:
Daniël de Kok 2024-08-12 06:41:39 +00:00
parent 8dcc7d3f6b
commit ccf4995744
2 changed files with 22 additions and 0 deletions

View File

@ -70,6 +70,10 @@
torch torch
transformers transformers
vllm vllm
(callPackage ./router.nix {
inherit (rustPlatform) buildRustPackage importCargoLock;
})
]); ]);
venvDir = "./.venv"; venvDir = "./.venv";

18
router.nix Normal file
View File

@ -0,0 +1,18 @@
{ buildRustPackage, importCargoLock, pkg-config, protobuf, openssl }:
buildRustPackage {
name = "text-generation-router";
src = ./.;
sourceDir = ./backends/v3;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl.dev protobuf ];
}