回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>我已经正确部署了python3应用程序构建了一个应用程序:</p>
<p><a href="https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard_python37/building-an-app/building-an-app-1" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard_python37/building-an-app/building-an-app-1</a></p>
<p>但现在我已经尝试部署了一个使用神经元网络的应用程序,它在本地使用virtualenv和请求.txt文件:</p>
<pre><code>Flask==1.1.1
numpy==1.17.4
scipy==1.3.2
gensim==3.8.1
tensorflow==2.0.0
</code></pre>
<p>“但此应用程序更新后5分钟内使用此服务时出现以下错误]”,默认为“使用此应用程序时出现以下错误]”</p>
^{pr2}$
<p>有人知道问题出在哪里吗?在</p>
<p>在检查构建日志中的错误时,我发现了一行内容:</p>
<p><code>Step #1 - "builder": exited with error [Errno 12] Cannot allocate memory</code></p>
<p>所以我变了应用程序yaml收件人:</p>
<pre><code>runtime: python37
handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
static_dir: static
# This handler routes all requests not caught above to your main app. It is
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.
- url: /.*
script: auto
resources:
cpu: 2
memory_gb: 8
disk_size_gb: 10
</code></pre>
<p>但我还是犯了同样的错误:(</p>
<p>它是构建日志:</p>
<pre><code>ERROR: build step 1 "gcr.io/gae-runtimes/python37_app_builder:python37_20191019_3_7_4_RC00" failed: exit status 1
ERROR
Finished Step #1 - "builder"
Step #1 - "builder": IOError: [Errno 2] No such file or directory: '""/output'
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__/ftl/common/ftl_error.py", line 77, in InternalErrorHandler
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 60, in main
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 65, in <module>
Step #1 - "builder": exec code in run_globals
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Step #1 - "builder": "__main__", fname, loader, pkg_name)
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": tar_runtime_package is likely not on the path
Step #1 - "builder": exited with error [Errno 12] Cannot allocate memory
Step #1 - "builder": ERROR tar_runtime_package tar -pcf /tmp/tmplWd4v8.tar --hard-dereference --transform flags=r;s,^,/.googleconfig/, --exclude *.pyc .
Step #1 - "builder": INFO full build took 79 seconds
Step #1 - "builder": INFO build process for FTL image took 79 seconds
Step #1 - "builder": INFO Building app layer took 0 seconds
Step #1 - "builder": INFO tar_runtime_package took 0 seconds
Step #1 - "builder": INFO tar_runtime_package tar -pcf /tmp/tmplWd4v8.tar --hard-dereference --transform flags=r;s,^,/.googleconfig/, --exclude *.pyc .
Step #1 - "builder": INFO starting: tar_runtime_package
Step #1 - "builder": INFO starting: Building app layer
Step #1 - "builder": INFO Building app layer took 76 seconds
Step #1 - "builder": INFO Finished gzipping tarfile.
Step #1 - "builder": INFO gzip_tar_runtime_package took 58 seconds
Step #1 - "builder":
Step #1 - "builder": INFO `gzip_tar_runtime_package` stdout:
Step #1 - "builder": INFO gzip_tar_runtime_package gzip /tmp/tmpStZGpR.tar -1
Step #1 - "builder": INFO starting: gzip_tar_runtime_package
Step #1 - "builder": INFO tar_runtime_package took 8 seconds
Step #1 - "builder":
Step #1 - "builder": INFO `tar_runtime_package` stdout:
Step #1 - "builder": INFO tar_runtime_package tar -pcf /tmp/tmpStZGpR.tar --hard-dereference --transform flags=r;s,^,/srv/, --exclude *.pyc .
Step #1 - "builder": INFO starting: tar_runtime_package
Step #1 - "builder": INFO starting: Building app layer
Step #1 - "builder": INFO checking_cached_requirements.txt_layer took 1 seconds
Step #1 - "builder": INFO [CACHE][HIT] v0.17.0:PYTHON (requirements)->62b99263456c1af3bff1307a585449789858bb17c695a2accfa55a3e5ee8f950
Step #1 - "builder": INFO check python version took 0 seconds
Step #1 - "builder":
Step #1 - "builder": INFO `python version` stderr:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO `python version` full cmd:
Step #1 - "builder": INFO starting: check python version
Step #1 - "builder":
Step #1 - "builder": gunicorn
Step #1 - "builder": tensorflow==2.0.0
Step #1 - "builder": gensim==3.8.1
Step #1 - "builder": scipy==1.3.2
Step #1 - "builder": numpy==1.17.4
Step #1 - "builder": Flask==1.1.1
Step #1 - "builder": INFO new_descriptor_contents:
Step #1 - "builder":
Step #1 - "builder": gunicorn
Step #1 - "builder": tensorflow==2.0.0
Step #1 - "builder": gensim==3.8.1
Step #1 - "builder": scipy==1.3.2
Step #1 - "builder": numpy==1.17.4
Step #1 - "builder": Flask==1.1.1
Step #1 - "builder": INFO descriptor_contents:
Step #1 - "builder": INFO {"architecture": "amd64", "author": "Unknown", "config": {}, "created": "2019-12-02T22:00:00Z", "history": [{"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Unknown", "created": "2019-12-02T22:00:00Z", "created_by": "//containerregistry/client:ftl.par"}, {"author": "Bazel", "created": "1970-01-01T00:00:00Z", "created_by": "bazel build ..."}], "os": "linux", "rootfs": {"diff_ids":
</code></pre>
<p>谢谢!在</p>