| { |
| lib, |
| stdenv, |
| buildPythonPackage, |
| poetry-core, |
| mkShell, |
| python3Packages, |
| gguf-py, |
| }@inputs: |
|
|
| let |
| llama-python-deps = with python3Packages; [ |
| numpy |
| sentencepiece |
| transformers |
| protobuf |
| torchWithoutCuda |
| gguf-py |
| tqdm |
|
|
| |
| gitpython |
| tabulate |
|
|
| |
| docstring-parser |
| pydantic |
|
|
| ]; |
|
|
| llama-python-test-deps = with python3Packages; [ |
| |
| matplotlib |
|
|
| |
| openai |
| pytest |
| prometheus-client |
| ]; |
| in |
|
|
| buildPythonPackage ({ |
| pname = "llama-scripts"; |
| version = "0.0.0"; |
| pyproject = true; |
|
|
| |
| |
| src = lib.cleanSourceWith { |
| filter = |
| name: type: |
| let |
| any = builtins.any (x: x); |
| baseName = builtins.baseNameOf name; |
| in |
| any [ |
| (lib.hasSuffix ".py" name) |
| (baseName == "README.md") |
| (baseName == "pyproject.toml") |
| ]; |
| src = lib.cleanSource ../../.; |
| }; |
| nativeBuildInputs = [ poetry-core ]; |
| nativeCheckInputs = llama-python-test-deps; |
| dependencies = llama-python-deps; |
| }) |
|
|