GoogleCloudPlatform / healthcare

Home Page:https://cloud.google.com/solutions/healthcare-life-sciences/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

breast_density_auto_ml.ipynb failing while building Inference_Module

sanjaykhobragade opened this issue · comments

This below step from the notebook is failing
gcloud builds submit --config scripts/inference/cloudbuild.yaml --timeout 1h scripts/inference

with the error msg:

Step 4/5 : RUN pip install --upgrade pip && pip install --upgrade virtualenv && virtualenv /opt/inference_module/venv && . /opt/inference_module/venv/bin/activate && cd /opt/inference_module/src/ && python setup.py install
---> Running in 43cb51c7bca3
Collecting pip
Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
Installing collected packages: pip
Found existing installation: pip 18.1
Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-19.3.1
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in
sys.exit(main())
TypeError: 'module' object is not callable
The command '/bin/sh -c pip install --upgrade pip && pip install --upgrade virtualenv && virtualenv /opt/inference_module/venv && . /opt/inference_module/venv/bin/activate && cd /opt/inference_module/src/ && python setup.py install' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: exit status 1

Changing pip install --upgrade pip to python -m pip install --upgrade pip in inference/Dockerfile resolves above issue. This is as per pip issue logged here, pypa/pip#7205

In addition, in inference/setup.py, change 'googleapis-common-protos==1.5.3', to
'googleapis-common-protos==1.6.0', version.

I am reopening this issue so that we can fix it for everyone else

This has been fixed in the recent update to the codelab. (#450)