Trying to put a small Tabular Model in the cloud, but the
fastai installation is failing.
Typically we are able to install packages by defining the
... # Install pyTorch Works https://download.pytorch.org/whl/cpu/torch-1.7.0%2Bcpu-cp37-cp37m-linux_x86_64.whl # Works https://download.pytorch.org/whl/cpu/torchvision-0.8.0-cp37-cp37m-linux_x86_64.whl # Works # Fails fastai==2.0.18 # Fails as well even if done separately fastcore==1.2.5 ...
The error thrown is:
Deploying function (may take a while - up to 2 minutes)...failed. ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: `pip_install_from_wheels` had stderr output: /opt/python3.7/bin/python3.7: No module named pip error: `pip_install_from_wheels` returned code: 1; Error ID: ECB5F712
Note that this ONLY occurs if
fastcore is defined in the requirements.txt. Other packages work fine.
There have been a couple posts saying if
pip is listed as a dependancy in the package, that it will cause a failure in a Google Cloud Function.
pip listed as a dependency in fastai? And how could it be removed?
I attempted removing from
requires.txt and repackaging, but this proved to be difficult… Is there an easy way to do this?
Other Things Tried
Installing w/ various versions of pip defined in the
requirements.txt(18.1, 19.0.3, 19.0.1) - although this shouldn’t be necessary…
- Updating gcloud:
gcloud components update
- Manually saving
fastaiin the package to be uploaded. For some reason it’s having troubles resolving
fastcore.testalthough I would think this would work…
There are a couple resources for FastAI v1, but unfortunately falls short in V2: