kreneskyp / ix

Autonomous GPT-4 agent platform
MIT License
1.01k stars 119 forks source link

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

Open happy15 opened 6 months ago

happy15 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

ok, thanks for the reply, will try.

kreneskyp commented 6 months ago

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