From 04020a72ae2a864ab1f489cab3c9f88e82ba24a0 Mon Sep 17 00:00:00 2001 From: kilyanni Date: Thu, 7 May 2026 00:22:37 +0200 Subject: [PATCH] autofaiss, haystack-ai, txtai: use faiss-cpu --- pkgs/development/python-modules/autofaiss/default.nix | 6 ++---- pkgs/development/python-modules/haystack-ai/default.nix | 9 ++------- pkgs/development/python-modules/txtai/default.nix | 9 ++------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/autofaiss/default.nix b/pkgs/development/python-modules/autofaiss/default.nix index 43ef1d4f7b88..ffe764851671 100644 --- a/pkgs/development/python-modules/autofaiss/default.nix +++ b/pkgs/development/python-modules/autofaiss/default.nix @@ -8,7 +8,7 @@ # dependencies embedding-reader, - faiss, + faiss-cpu, fire, fsspec, numpy, @@ -37,8 +37,6 @@ buildPythonPackage rec { # The `dataclasses` packages is a python2-only backport, unnecessary in # python3. "dataclasses" - # We call it faiss, not faiss-cpu. - "faiss-cpu" ]; pythonRelaxDeps = [ @@ -55,7 +53,7 @@ buildPythonPackage rec { dependencies = [ embedding-reader - faiss + faiss-cpu fire fsspec numpy diff --git a/pkgs/development/python-modules/haystack-ai/default.nix b/pkgs/development/python-modules/haystack-ai/default.nix index 07252bc18662..5a8249999456 100644 --- a/pkgs/development/python-modules/haystack-ai/default.nix +++ b/pkgs/development/python-modules/haystack-ai/default.nix @@ -68,7 +68,7 @@ seqeval, pdf2image, pytesseract, - faiss, + faiss-cpu, # , faiss-gpu pinecone-client, onnxruntime, @@ -105,11 +105,6 @@ buildPythonPackage rec { hatchling ]; - pythonRemoveDeps = [ - # We call it faiss, not faiss-cpu. - "faiss-cpu" - ]; - propagatedBuildInputs = [ boilerpy3 events @@ -210,7 +205,7 @@ buildPythonPackage rec { pdf2image pytesseract ]; - only-faiss = [ faiss ]; + only-faiss = [ faiss-cpu ]; # only-faiss-gpu = [ # faiss-gpu # ]; diff --git a/pkgs/development/python-modules/txtai/default.nix b/pkgs/development/python-modules/txtai/default.nix index e9c5b77a2bef..64a4c9cc86eb 100644 --- a/pkgs/development/python-modules/txtai/default.nix +++ b/pkgs/development/python-modules/txtai/default.nix @@ -7,7 +7,7 @@ setuptools, # dependencies - faiss, + faiss-cpu, torch, transformers, huggingface-hub, @@ -251,13 +251,8 @@ buildPythonPackage { build-system = [ setuptools ]; - pythonRemoveDeps = [ - # We call it faiss, not faiss-cpu. - "faiss-cpu" - ]; - dependencies = [ - faiss + faiss-cpu huggingface-hub msgpack numpy