Skip to content
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

ImportError Could not import sentence_transformers python package. Please install it with pip install sentence-transformers. #466

Open
happy15 opened this issue Mar 8, 2024 · 3 comments

Comments

@happy15
Copy link

happy15 commented Mar 8, 2024

Hi, I bootstrapped ix with the docker solution and tried to do build a RAG agent with huggingface embedding, which needs sentence-transformers the python lib.

But it seems that sentence-transformers is not included in the docker image and I encountered reply with "ImportError
Could not import sentence_transformers python package. Please install it with pip install sentence-transformers."

Do I miss anything here?

Below is the flow under construction:

image
@saahil1801
Copy link

Hello @happy15 , yes you got that right , we need to install sentence-transformers , a permanent solution is to modify your Dockerfile to include the installation of sentence-transformers. This way, every time you build your Docker image, the sentence-transformers library will be included.
RUN pip install sentence-transformers
Then, you can rebuild your Docker image and restart your container. Also you can verify the same using print(sentence_transformers.version)

@happy15
Copy link
Author

happy15 commented Mar 17, 2024

ok, thanks for the reply, will try.

@kreneskyp
Copy link
Owner

Yes, assuming you're building from source add the library to requirements.txt. It should be included in the image when re-built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants