Skip to content

Instantly share code, notes, and snippets.

@John-Lin
Last active November 10, 2022 19:31
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save John-Lin/c8083b4db75e97cf12943c545301acd8 to your computer and use it in GitHub Desktop.
Save John-Lin/c8083b4db75e97cf12943c545301acd8 to your computer and use it in GitHub Desktop.
Kubeflow on Minikube

Deploy Kubeflow on Minikube

Install minikube

Please see How to Minikube

Running a minikube with 4CPUs and 8GB memory

$ minikube start --cpus 4 --memory 8192

If you want to use the vm driver with hyperkit

$ minikube start --vm-driver=hyperkit --cpus 4 --memory 8192

Deploy Kubeflow

$ git clone git@github.com:google/kubeflow.git
$ cd kubeflow
$ kubectl apply -f components/ -R
# Wait until all pod are getting running state. (6-7 mins)

Get the URL for the notebook.

$ minikube service tf-hub-lb --url

or access JupyterHub on http://localhost:8000 by

$ kubectl port-forward tf-hub-0 8000:8000

User Login

input any username and password will login

Basic notebook with scipy in JupyterHub

Spawner options

Image : jupyter/scipy-notebook (jupyterhub version MUST be at least 0.8.1)

CPU: 200m (could be more)

Memory: 256Mi (could be more)

Extra Resource Limits: (leave it empty)

than press the Spawn button

##Tensorflow wit notebook in JupyterHub

Spawner options

Image : gcr.io/kubeflow/tensorflow-notebook-cpu

CPU: 300m (almost run out of quota in 4 CPU minikube)

Memory: 1.5Gi (could be more)

Extra Resource Limits: (leave it empty)

than press the Spawn button

Running a tensorflow example

See Neural Network Example

You may get this message, python3.5 still works. but we are in 3.6 wait until google fixed this issue. We could just ignore.

/home/raju/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6

See tensorflow/tensorflow#14182

CPU/Mem resource monitoring on K8S

$ kubectl describe node 
@phgSW61HS
Copy link

phgSW61HS commented Nov 10, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment