By Scott Mastro
Adding a python dependency to a DigitalOcean function seems straight-forward: https://www.digitalocean.com/community/questions/how-to-install-python-requirements-with-serverless-function
It appears to work when I install numpy and Pillow:
requirements.txt
numpy==1.24.1
Pillow==9.4.0
However, I’m having trouble when trying to add opencv:
opencv-python==4.7.0.68
When attempting to deploy from the CLI I get this error:
Error: While deploying action ‘test/crop’ (running remote build): The action exhausted its memory and was aborted.
Any tips?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Your function seems to be running out of memory according to this part of the output that you’ve shared:
The action exhausted its memory and was aborted.
I’ve just answered a similar question on how to increase your function memory limit, I would recommend following the steps here:
https://www.digitalocean.com/community/questions/problem-in-working-with-xml-parsing-by-python
Let me know if you have any questions!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.