Back

[SOLVED] Problems with building python function

  • 0
  • Self Hosted
  • Functions
Ars
29 Dec, 2023, 08:19

I have a python function which uses OpenAI embeddings to do similarity search. It also uses LangChain, Google VertexAI and Qdrant. When deploying function this error comes up while installing dependencies. Output is in file attached. As I understand, the environment is missing some libraries. Is there any way to modify base environment? Or how do I fix that?

TL;DR
The user encountered issues while building a Python function. They mentioned that the build container is different from the runtime container, and OS dependencies need to be installed in the runtime container. They tried downloading APK dependencies and ensuring they were installed in the function code, but encountered slow execution and library problems. They eventually rewrote the code in another language but faced long deploy times and library issues again. They edited the "commands" in the appwrite.json file to include additional dependencies, but now the installation process gets stuck. The user believes that the environment is missing some libraries and asks for advice on modifying the base environment or fixing the issue. Solution:
Ars
29 Dec, 2023, 11:09

I edited "commands" in appwrite.json to this: apk --no-cache add musl-dev linux-headers g++ gcc openblas openblas-dev && pip install -r requirements.txt

And now it doesn't output any errors, but gets stuck on "installing build dependencies"

Drake
1 Jan, 2024, 21:27

Does it fail? Or does it say processing?

Ars
1 Jan, 2024, 22:31

To be honest, I just rewrote everything in another language. I managed to get it deployed successfully, but deploy times are huge + it didn't execute, problem with libraries once again.

Ars
1 Jan, 2024, 22:33

[SOLVED] Problems with building python function

Drake
1 Jan, 2024, 22:47

Python was slow or the new runtime?

Drake
1 Jan, 2024, 22:49

Btw, the build container is different than the runtime container and it you have some runtime OS dependencies, you would need to make sure they're installed in the runtime container.

I've done this before by downloading the APK dependencies and ensuring they get installed in the function code

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more