Unverified Commit 6f4bb4f2 authored by Daniël de Kok's avatar Daniël de Kok Committed by GitHub
Browse files

nix: incremental build of the launcher (#2410)

parent 8a7749b8
{ buildRustPackage, importCargoLock, pkg-config, protobuf, openssl }:
buildRustPackage {
name = "text-generation-lancher";
src = ./.;
sourceDir = ./launcher;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl.dev protobuf ];
}
This diff is collapsed.
{
inputs = {
crate2nix = {
url = "github:nix-community/crate2nix";
inputs.nixpkgs.follows = "tgi-nix/nixpkgs";
};
tgi-nix.url = "github:danieldk/tgi-nix";
nixpkgs.follows = "tgi-nix/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
......@@ -12,6 +16,7 @@
outputs =
{
self,
crate2nix,
nixpkgs,
flake-utils,
rust-overlay,
......@@ -21,6 +26,10 @@
flake-utils.lib.eachDefaultSystem (
system:
let
cargoNix = crate2nix.tools.${system}.appliedCargoNix {
name = "tgi";
src = ./.;
};
config = {
allowUnfree = true;
cudaSupport = true;
......@@ -81,12 +90,11 @@
transformers
vllm
cargoNix.workspaceMembers.text-generation-launcher.build
(callPackage ./router.nix {
inherit (rustPlatform) buildRustPackage importCargoLock;
})
(callPackage ./_launcher.nix {
inherit (rustPlatform) buildRustPackage importCargoLock;
})
]);
venvDir = "./.venv";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment