Using google cloud function to spawn a python script(使用谷歌云函数生成 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.
我想使用节点,因为我有一些我想在之后运行的 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?
推荐答案
是的,这是可能的,你可能需要使用 http://www.pyinstaller.org/ 打包python代码.看看我的 python 库,以实际在 python 中编写函数来完成它,或者只是复制粘贴你自己需要做的任何部分: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 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用谷歌云函数生成 python 脚本
基础教程推荐
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 筛选NumPy数组 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01