Я пытаюсь развернуть приложение фляги на gcloud, которое использует pytorch.когда я запускал сервер локально, он работал нормально.но когда я развернул тот же код с помощью приложения gcloud, он выдает следующую ошибку:
Step #1: Step 6/9 : ADD requirements.txt /app/
Step #1: ---> eed90d6f59c6
Step #1: Step 7/9 : RUN pip install -r requirements.txt
Step #1: ---> Running in e6f627cd6ee4
Step #1: Collecting torch (from -r requirements.txt (line 1))
Step #1: Downloading
https://files.pythonhosted.org/packages/df/a4/7f5ec6e9df1bf13
f1881353702aa9713fcd997481b26018f35e0be85faf7/torch-0.4.0-cp27-cp27mu-
manylinux1_x8
6_64.whl (484.0MB)
Step #1: Exception:
Step #1: Traceback (most recent call last):
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/basecommand.py", line 215, in main
Step #1: status = self.run(options, args)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/commands/install.py", line 335, in run
Step #1: wb.build(autobuilding=True)
Step #1: File "/env/local/lib/python2.7/site-packages/pip/wheel.py",
line 749, in build
Step #1: self.requirement_set.prepare_files(self.finder)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/req/req_set.py", line 380, in prepare_files
Step #1: ignore_dependencies=self.ignore_dependencies))
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/req/req_set.py", line 620, in _prepare_file
Step #1: session=self.session, hashes=hashes)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/download.py", line 821, in unpack_url
Step #1: hashes=hashes
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/download.py", line 659, in unpack_http_url
Step #1: hashes)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/download.py", line 882, in _download_http_url
Step #1: _download_url(resp, link, content_file, hashes)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/download.py", line 603, in _download_url
Step #1: hashes.check_against_chunks(downloaded_chunks)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/utils/hashes.py", line 46, in check_against_chunks
Step #1: for chunk in chunks:
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/download.py", line 571, in written_chunks
Step #1: for chunk in chunks:
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/utils/ui.py", line 139, in iter
Step #1: for x in it:
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/download.py", line 560, in resp_read
Step #1: decode_content=False):
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/_vendor/urllib3/response.py", line 436, in stream
Step #1: data = self.read(amt=amt, decode_content=decode_content)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/_vendor/urllib3/response.py", line 384, in read
Step #1: data = self._fp.read(amt)
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/_vendor/cachecontrol/filewrapper.py", line 63, in read
Step #1: self._close()
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/_vendor/cachecontrol/filewrapper.py", line 50, in _close
Step #1: self.__callback(self.__buf.getvalue())
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/_vendor/cachecontrol/controller.py", line 275, in
cache_response
Step #1: self.serializer.dumps(request, response, body=body),
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/_vendor/cachecontrol/serialize.py", line 55, in dumps
Step #1: "body": _b64_encode_bytes(body),
Step #1: File "/env/local/lib/python2.7/site-
packages/pip/_vendor/cachecontrol/serialize.py", line 12, in
_b64_encode_bytes
Step #1: return base64.b64encode(b).decode("ascii")
Step #1: MemoryError
Step #1: You are using pip version 9.0.3, however version 10.0.1 is
available.
Step #1: You should consider upgrading via the 'pip install --upgrade
pip' command.
Step #1: The command '/bin/sh -c pip install -r requirements.txt'
returned a non-zero code: 2
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/cloud-
builders/docker@sha256:5836cd0f940f2f1a912b8fee4c74e5
f1a84df92aab557c608a94e171e9df8d46" failed: exit status 2
Step #1:
----------------------------------------------------------------------
----------------------------------------------------------------------
---------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at
https://console.cloud.google.com/gcr/builds/d1e646e5-53f4-43d0-8504-
98226e97de78?project=1091101138750 Fai
lure status: UNKNOWN: Error Response: [2] Build failed; check build
logs
for details
Мои требования. Текст выглядит следующим образом
torch
torchvision
jsonpickle
Flask == 0.12.2
gunicorn == 19.7.1
numpy
matplotlib
и приложение.yaml выглядит следующим образом.
runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
python_version: 2
# This sample incurs costs to run on the App Engine flexible
environment.
# The settings below are to reduce costs during testing and are not
appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/python/configuring-
your-app-with-app-yaml
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 1.5
disk_size_gb: 10