简体   繁体   中英

Using google cloud function to spawn a python script

I need to execute some python machine learning code and was hoping to execute it from a node process within a Google Cloud Function.

I want to use node because I have some firebase admin tasks I want to run afterwards. I also have a deployment workflow with node that I'm content with.

Is this possible? If so, can you point me to an example?

Yes, this would be possible, you probably need to use http://www.pyinstaller.org/ to package the python code. Have a look at my python library for actually writing your functions in python to do it, or just copy paste whatever parts you need to do it yourself: https://github.com/MartinSahlen/cloud-functions-python/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM