Updating the flake. (#2404)

This commit is contained in:
Nicolas Patry 2024-08-12 18:09:16 +02:00 committed by GitHub
parent 30395b09f4
commit 19ea85f8dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 165 additions and 15 deletions

12
_server.nix Normal file
View File

@ -0,0 +1,12 @@
{ mkPoetryApplication, pkg-config, protobuf, openssl }:
mkPoetryApplication {
# name = "text-generation-server";
projectDir = ./server;
# nativeBuildInputs = [ pkg-config ];
# buildInputs = [ openssl.dev protobuf ];
}

View File

@ -33,19 +33,96 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": { "locked": {
"lastModified": 1723099294, "lastModified": 1710146030,
"narHash": "sha256-kkijy6sXo/SOhFw7ZEfYHbj1FJHxoeetOVOn3qNHc5o=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "danieldk", "owner": "numtide",
"repo": "nixpkgs", "repo": "flake-utils",
"rev": "45892b6ec142eaf300d777926983a433b5842c88", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "danieldk", "owner": "numtide",
"ref": "cudnn-9.3", "repo": "flake-utils",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703863825,
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1719763542,
"narHash": "sha256-mXkOj9sJ0f69Nkc2dGGOWtof9d1YNY8Le/Hia3RN+8Q=",
"owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e6cdd8a11b26b4d60593733106042141756b54a3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1723418128,
"narHash": "sha256-k1pEqsnB6ikZyasXbtV6A9akPZMKlsyENPDUA6PXoJo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "129f579cbb5b4c1ad258fd96bdfb78eb14802727",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs",
"systems": "systems_3",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1723343306,
"narHash": "sha256-/6sRkPq7/5weX2y0V8sQ29Sz35nt8kyj+BsFtkhgbJE=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "4a1c112ff0c67f496573dc345bd0b2247818fc29",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github" "type": "github"
} }
}, },
@ -56,6 +133,7 @@
"tgi-nix", "tgi-nix",
"nixpkgs" "nixpkgs"
], ],
"poetry2nix": "poetry2nix",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"tgi-nix": "tgi-nix" "tgi-nix": "tgi-nix"
} }
@ -68,11 +146,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723170066, "lastModified": 1723429325,
"narHash": "sha256-SFkQfOA+8AIYJsPlQtxNP+z5jRLfz91z/aOrV94pPmw=", "narHash": "sha256-4x/32xTCd+xCwFoI/kKSiCr5LQA2ZlyTRYXKEni5HR8=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "fecfe4d7c96fea2982c7907997b387a6b52c1093", "rev": "65e3dc0fe079fe8df087cd38f1fe6836a0373aad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -96,17 +174,46 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
"tgi-nix": { "tgi-nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1723234585, "lastModified": 1723450799,
"narHash": "sha256-HChJpNP155FPhHr9C5BtqllV8Uv/Ebg59HhMc/HhQrc=", "narHash": "sha256-cuT/ce7R2D5Lx6Ted4YS4y+WrAAOXQFAbzLsM1vtPo8=",
"owner": "danieldk", "owner": "danieldk",
"repo": "tgi-nix", "repo": "tgi-nix",
"rev": "15bd4a978d6c2c8b04b7afc335d137dbe41e73df", "rev": "29f9b45bd613eced65c4a5241a00aa9346f63d90",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -114,6 +221,27 @@
"repo": "tgi-nix", "repo": "tgi-nix",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1719749022,
"narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -3,6 +3,7 @@
tgi-nix.url = "github:danieldk/tgi-nix"; tgi-nix.url = "github:danieldk/tgi-nix";
nixpkgs.follows = "tgi-nix/nixpkgs"; nixpkgs.follows = "tgi-nix/nixpkgs";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
poetry2nix.url = "github:nix-community/poetry2nix";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "tgi-nix/nixpkgs"; inputs.nixpkgs.follows = "tgi-nix/nixpkgs";
@ -15,6 +16,7 @@
flake-utils, flake-utils,
rust-overlay, rust-overlay,
tgi-nix, tgi-nix,
poetry2nix,
}: }:
flake-utils.lib.eachDefaultSystem ( flake-utils.lib.eachDefaultSystem (
system: system:
@ -30,6 +32,11 @@
tgi-nix.overlay tgi-nix.overlay
]; ];
}; };
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryEditablePackage;
text-generation-server = mkPoetryEditablePackage {
editablePackageSources = ./server;
};
in in
{ {
devShells.default = devShells.default =
@ -50,14 +57,17 @@
venvShellHook venvShellHook
pip pip
click
einops einops
fbgemm-gpu fbgemm-gpu
flashinfer
flash-attn flash-attn
flash-attn-layer-norm flash-attn-layer-norm
flash-attn-rotary flash-attn-rotary
grpc-interceptor grpc-interceptor
grpcio-reflection grpcio-reflection
grpcio-status grpcio-status
grpcio-tools
hf-transfer hf-transfer
loguru loguru
marlin-kernels marlin-kernels