2024-08-09 04:32:37 -06:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
tgi-nix.url = "github:danieldk/tgi-nix";
|
|
|
|
nixpkgs.follows = "tgi-nix/nixpkgs";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2024-08-09 07:24:21 -06:00
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs.nixpkgs.follows = "tgi-nix/nixpkgs";
|
|
|
|
};
|
2024-08-09 04:32:37 -06:00
|
|
|
};
|
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
2024-08-09 07:24:21 -06:00
|
|
|
rust-overlay,
|
2024-08-09 04:32:37 -06:00
|
|
|
tgi-nix,
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
cudaSupport = true;
|
|
|
|
};
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit config system;
|
2024-08-09 07:24:21 -06:00
|
|
|
overlays = [
|
|
|
|
rust-overlay.overlays.default
|
|
|
|
tgi-nix.overlay
|
|
|
|
];
|
2024-08-09 04:32:37 -06:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default =
|
|
|
|
with pkgs;
|
|
|
|
mkShell {
|
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
openssl.dev
|
|
|
|
pkg-config
|
2024-08-09 07:24:21 -06:00
|
|
|
(rust-bin.stable.latest.default.override {
|
|
|
|
extensions = [
|
|
|
|
"rust-analyzer"
|
|
|
|
"rust-src"
|
|
|
|
];
|
|
|
|
})
|
2024-08-09 04:32:37 -06:00
|
|
|
]
|
|
|
|
++ (with python3.pkgs; [
|
|
|
|
venvShellHook
|
|
|
|
pip
|
|
|
|
|
|
|
|
einops
|
|
|
|
fbgemm-gpu
|
|
|
|
flash-attn
|
|
|
|
flash-attn-layer-norm
|
|
|
|
flash-attn-rotary
|
|
|
|
grpc-interceptor
|
|
|
|
grpcio-reflection
|
|
|
|
grpcio-status
|
|
|
|
hf-transfer
|
|
|
|
loguru
|
|
|
|
marlin-kernels
|
|
|
|
opentelemetry-api
|
|
|
|
opentelemetry-exporter-otlp
|
|
|
|
opentelemetry-instrumentation-grpc
|
|
|
|
opentelemetry-semantic-conventions
|
|
|
|
peft
|
|
|
|
tokenizers
|
|
|
|
torch
|
|
|
|
transformers
|
|
|
|
vllm
|
|
|
|
]);
|
|
|
|
|
|
|
|
venvDir = "./.venv";
|
|
|
|
|
|
|
|
postVenv = ''
|
|
|
|
unset SOURCE_DATE_EPOCH
|
|
|
|
'';
|
|
|
|
postShellHook = ''
|
|
|
|
unset SOURCE_DATE_EPOCH
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|