Out of memory when building FastAPI app with sentence-transformers

I have the following requirements.txt:

scylla-driver==3.29.4
sentence-transformers[onnx]==5.1.1
groq==0.32.0
fastapi==0.119.1
uvicorn==0.38.0

It’s a Fast API project. Build works fine if I comment out the `sentence-transformers[onnx]==5.1.1` part. AFAIK Vercel provides 8GB of memory for builds. Installing this requires <300MB memory on my machine. Why does it fail on Vercel? Error is this:

 At least one "Out of Memory" ("OOM") event was detected during the build.

Thanks for the help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.