-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Faiss-node in aws having problem working fine locally #25
Comments
@abgupta99 Thank you for the issue, I will try to reproduce and fix it |
This seems identical to the issue I have with HNSWlib-node. |
Spent the day building test cases for this, and it's the same langchainjs error. Most approaches end up with: "Could not import faiss-node. Please install faiss-node as a dependency with, e.g. Currently I see that there is any route to using langchain with either faiss or hnswnlib on AWS Lambda. |
Having similar problem when deployed on Vercel, while on local dev is working fine
|
I have create a build for AWS Lambda in #30 It has not been released yet, but you can try the version I built manually below: For other projects, please replace with the files under the path below: |
Hi, No luck my side I’m afraid: still missing libgomp.so.1:
Also, after adding the Faiss layer I can't add anything much else as it's far too big:
David |
@dmb0058 I want to know whether it works properly if you directly upload the zip(faiss-node-v0.2.2-aws-x64.zip) I provided above to AWS. Please confirm that you have replaced the files(node_modules/faiss-node/build/Release) in my zip above to the zip you finally want to upload to AWS. I also made a demo for langchain here: langchain-ai/langchainjs#1930 (comment) |
Yes, the demo zip (faiss-node-v0.2.2-aws-x64.zip) runs when I upload it as a lambda and gives the same results as you show above. I can't create a layer though, so can't use this in practice:
|
@dmb0058 Can you reduce the size of the zip to make it meet the limit first. |
That sounds really good. Let me see if I can strip some of the other
modules in the application.
…On Sat, 22 Jul 2023, 16:10 Fan, ***@***.***> wrote:
@dmb0058 <https://github.com/dmb0058> Can you reduce the size of the zip
to make it meet the limit first.
The prebuilt binaries is too large under Linux was also mentioned in your
previous issue(#26 <#26>).
The binaries for AWS have shrunk a lot. The zip containing faiss-node is
only 7.5MB. And the zip containing langchain and faiss-node has 15.5MB.
Which is far less than the limit of AWS. Please identify what content takes
up space and try to reduce it.
—
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDXCQKCC5FK5EWNK5PSMC3XRPUN7ANCNFSM6AAAAAA2B4CLBY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@dmb0058 You can also try this demo langchain-ai/langchainjs#1930 (comment) |
The new version was released, To use faiss-node in AWS, you can download |
This now works flawlessly with Fly.io, I had made a cool demo before and now I don't need to copy the zip folder over. Thank you for maintaining and improving this 🙏🏻 |
I'm happy to pay you one time 30$ as the best I can for now. Can you share a buymeacoffee/paypal/stripe link? Thanks! |
This is totally out of my respect for your work. |
The newer version is still cannot get through on the lambda layers, still having the same error which is |
Describe the bug
A clear and concise description of what the bug is.
Environment:
To Reproduce
Steps to reproduce the behavior:
1.
2.
Expected behavior
should be run succesfully and store text in form of vector store
Screenshots
"errorType": "Error",
"errorMessage": "Could not import faiss-node. Please install faiss-node as a dependency with, e.g.
npm install -S faiss-node
and make sure you havelibomp
installed in your path.\n\nError: /opt/nodejs/node18/node_modules/faiss-node/build/Release/faiss-node.node: cannot open shared object file: No such file or directory","trace": [
"Error: Could not import faiss-node. Please install faiss-node as a dependency with, e.g.
npm install -S faiss-node
and make sure you havelibomp
installed in your path.","",
"Error: /opt/nodejs/node18/node_modules/faiss-node/build/Release/faiss-node.node: cannot open shared object file: No such file or directory",
" at FaissStore.importFaiss (file:///opt/nodejs/node18/node_modules/langchain/dist/vectorstores/faiss.js:207:19)",
" at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at async FaissStore.addVectors (file:///opt/nodejs/node18/node_modules/langchain/dist/vectorstores/faiss.js:60:37)",
" at async FaissStore.fromDocuments (file:///opt/nodejs/node18/node_modules/langchain/dist/vectorstores/faiss.js:197:9)",
" at async Runtime.handler (file:///var/task/index.mjs:57:19)"
]
}
.
The text was updated successfully, but these errors were encountered: