Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAE Managed VMs: Possible to use C-based Python libraries with standard runtime?

I'm building a background module for my app in Python 2.7, but it needs to use C-based external libraries such as OpenCV. While GAE only "directly" supports pure Python libraries, I understand that using a managed VM removes that constraint. What I'm not quite clear on, after reading the documentation, is whether I would need to use a custom runtime, or whether a standard Python runtime (for which there's a ready-made Docker file and built-in API support for Datastore, Task Queue, etc.) would be sufficient.

Thanks in advance for any insight!

like image 723
KeepingItClassy Avatar asked Mar 20 '26 11:03

KeepingItClassy


1 Answers

The standard runtime is fine, you just need to add your extra dependencies to the Dockerfile that gets created. The tutorial in the docs (specifically Step 6) shows an example of building a python app that uses a C-extension.

like image 171
Greg Avatar answered Mar 22 '26 01:03

Greg