kubeflow / fairing

Python SDK for building, training, and deploying ML models
Apache License 2.0
337 stars 144 forks source link

import fairing fails for gcr.io/kubeflow-images-public/fairing:v0.0.1 #34

Open jlewi opened 5 years ago

jlewi commented 5 years ago

I tried spinning up a notebook in Kubeflow 0.3 using image gcr.io/kubeflow-images-public/fairing:v0.0.1

image: gcr.io/kubeflow-images-public/fairing:v0.0.1
imageID: docker-pullable://gcr.io/kubeflow-images-public/fairing@sha256:3cfffe528819a307ebe845b22b4eb9bc0f18f743c1ab19b3a8c0c2f88ab78f34

In the notebook when I try to import fairing I get the following error

ImportErrorTraceback (most recent call last)
<ipython-input-4-011d40e952a6> in <module>()
----> 1 import fairing

ImportError: No module named fairing

But if I start a pod running that image

kubectl run -it jlewi-fairing --restart=Never --image=gcr.io/kubeflow-images-public/fairing:v0.0.1 --command /bin/bash

Import works just fine.

seems to be different from #31

jlewi commented 5 years ago

The error is different from #31 and my notebook is named "demo.ipynb"

jlewi commented 5 years ago

If I start the image outside jupyter and import fairing I can see that is installed in /home/jovyan

In [1]: import fairing                                                                                                                             

In [2]: fairing.__file__                                                                                                                           
Out[2]: '/home/jovyan/.local/lib/python3.6/site-packages/fairing/__init__.py'

So I think the problem is that it is getting overrwritten by the pd which gets mounted at /home/jovyan