examples/code_search
Sanyam Kapoor a687c51036 Add a Jupyter notebook to be used for Kubeflow codelabs (#217)
* Add a Jupyter notebook to be used for Kubeflow codelabs

* Add help command for create_function_embeddings module

* Update README to point to Jupyter Notebook

* Add prerequisites to readme

* Update README and getting started with notebook guide

* [wip]

* Update noebook with BigQuery previews

* Update notebook to automatically select the latest MODEL_VERSION
2018-08-13 21:43:26 -07:00
..
docker Build just one image with the correct tag instead of double the number 2018-08-09 10:53:23 -07:00
kubeflow Parametrize volumes and ports for nmslib containers 2018-08-09 10:53:23 -07:00
src Upgrade JS app to be served at any path prefix 2018-08-09 10:53:23 -07:00
.dockerignore Integrate batch prediction (#184) 2018-07-23 16:26:23 -07:00
.gitignore Extension of T2T Ksonnet component (#149) 2018-06-25 15:09:22 -07:00
README.md Add a Jupyter notebook to be used for Kubeflow codelabs (#217) 2018-08-13 21:43:26 -07:00
code-search.ipynb Add a Jupyter notebook to be used for Kubeflow codelabs (#217) 2018-08-13 21:43:26 -07:00

README.md

Code Search on Kubeflow

This demo implements End-to-End Code Search on Kubeflow.

Prerequisites

NOTE: If using the JupyterHub Spawner on a Kubeflow cluster, use the Docker image gcr.io/kubeflow-images-public/kubeflow-codelab-notebook which has baked all the pre-prequisites.

  • Kubeflow Latest This notebook assumes a Kubeflow cluster is already deployed. See Getting Started with Kubeflow.

  • Python 2.7 (bundled with pip) For this demo, we will use Python 2.7. This restriction is due to Apache Beam, which does not support Python 3 yet (See BEAM-1251).

  • Google Cloud SDK This example will use tools from the Google Cloud SDK. The SDK must be authenticated and authorized. See Authentication Overview.

  • Ksonnet 0.12 We use Ksonnet to write Kubernetes jobs in a declarative manner to be run on top of Kubeflow.

Getting Started

To get started, follow the instructions below.

NOTE: We will assume that the Kubeflow cluster is available at kubeflow.example.com. Make sure you replace this with the true FQDN of your Kubeflow cluster in any subsequent instructions.

  • Spawn a new JupyterLab instance inside the Kubeflow cluster by pointing your browser to https://kubeflow.example.com/hub and clicking "Start My Server".

  • In the Image text field, enter gcr.io/kubeflow-images-public/kubeflow-codelab-notebook:v20180808-v0.2-22-gcfdcb12. This image contains all the pre-requisites needed for the demo.

  • Once spawned, you should be redirected to the notebooks UI. We intend to go to the JupyterLab home page which is available at the URL - https://kubeflow.example.com/user/<ACCOUNT_NAME>/lab. TIP: Simply point the browser to /lab instead of the /tree path in the URL.

  • Spawn a new Terminal and run

    $ git clone --branch=master --depth=1 https://github.com/kubeflow/examples
    

    This will create an examples folder. It is safe to close the terminal now.

  • Refresh the File Explorer (typically to the left) and navigate to examples/code_search. Open the Jupyter notebook code-search.ipynb and follow it along.

Acknowledgements

This project derives from hamelsmu/code_search.