使用谷歌云函数生成python脚本 [英] Using google cloud function to spawn a python script

查看:489
本文介绍了使用谷歌云函数生成python脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要执行一些python机器学习代码,并希望从Google Cloud Function的节点进程中执行它.

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

我想使用node,因为我有一些稍后要运行的firebase管理任务.我也有一个我满意的节点的部署工作流.

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?

推荐答案

是的,这是可能的,您可能需要使用 https://github.com/MartinSahlen/cloud-functions-python/

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/

这篇关于使用谷歌云函数生成python脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆