I try to deploy a google cloud function with dependencies via requirements.txt. Deployment takes terribly long and fails with this message:
(gcloud.functions
PyTorch ships a distribution on PyPI with CUDA/Nvidia GPU support by default, but the Cloud Functions runtime doesn't have GPU support, or the necessary system libraries.
Instead, you should use the URL provided by https://pytorch.org/ when selecting:
pip3 install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp37-cp37m-linux_x86_64.whl
Which would make your requirements.txt
:
Flask==1.0.2
dill>=0.2.8
numpy>=1.15.0
requests>=2.20.0
six==1.12.0
spacy>=2.1.0
https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp37-cp37m-linux_x86_64.whl
torchtext>=0.3.1