Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 75 lines 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 7 # build-system 8 poetry-core, 9 10 # dependencies 11 huggingface-hub, 12 loguru, 13 mmh3, 14 numpy, 15 onnx, 16 onnxruntime, 17 pillow, 18 pystemmer, 19 requests, 20 snowballstemmer, 21 tokenizers, 22 tqdm, 23}: 24 25buildPythonPackage rec { 26 pname = "fastembed"; 27 version = "0.3.5"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.8"; 31 32 src = fetchFromGitHub { 33 owner = "qdrant"; 34 repo = "fastembed"; 35 rev = "refs/tags/v${version}"; 36 hash = "sha256-IdIGht4RcejXoBTJ8eHi5fNw2ffxIi/chuoQBNjA98g="; 37 }; 38 39 build-system = [ poetry-core ]; 40 41 dependencies = [ 42 huggingface-hub 43 loguru 44 mmh3 45 numpy 46 onnx 47 onnxruntime 48 pillow 49 pystemmer 50 requests 51 snowballstemmer 52 tokenizers 53 tqdm 54 ]; 55 56 pythonImportsCheck = [ "fastembed" ]; 57 58 pythonRelaxDeps = [ 59 "onnxruntime" 60 "pillow" 61 ]; 62 63 # there is one test and it requires network 64 doCheck = false; 65 66 meta = { 67 description = "Fast, Accurate, Lightweight Python library to make State of the Art Embedding"; 68 homepage = "https://github.com/qdrant/fastembed"; 69 changelog = "https://github.com/qdrant/fastembed/releases/tag/v${version}"; 70 license = lib.licenses.asl20; 71 maintainers = with lib.maintainers; [ happysalada ]; 72 # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' 73 badPlatforms = [ "aarch64-linux" ]; 74 }; 75}