将带有textract模块的Python应用程序部署到Google Cloud Platform [英] Deploy Python app with textract module to Google Cloud Platform
问题描述
我想创建一个Python脚本来解析40.000个PDF文件(文本和图像).由于我看到没有简单的方法可以检查页面是否包含图像,因此我认为我应该使用textract模块.
I want to create a Python script that will parse 40.000 PDF files(text and images). Since I saw that there is no easy method to check if a page contains images I think I should use textract module.
理想情况下,我将部署到Google App Engine.
Ideally I would deploy to Google App Engine.
我的问题是,对于textract,我还安装了Python以外的其他软件包到我的系统中.我可以毫无问题地在Google Cloud App Engine上部署脚本(带有正确的requirements.txt文件)吗?还是我会用别的东西?
My question is, for textract I've also installed other packages beside Python to my system. Can I deploy the script(with proper requirements.txt file) on Google Cloud App Engine without problem? or I will to use something else?
推荐答案
可以使用App Engine,但只能与灵活的环境,并使用
It is possible to use App Engine, but only with the Flexible environment and using a custom runtime, which allows you to add non-python dependencies (and also python dependencies not installable via pip
):
自定义运行时允许您定义新的运行时环境, 可能包括其他组件,例如语言解释器或 应用服务器.
Custom runtimes allow you to define new runtime environments, which might include additional components like language interpreters or application servers.
另请参见构建自定义运行时.
这篇关于将带有textract模块的Python应用程序部署到Google Cloud Platform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!