git clone [email protected]/leigh-johnson/kubeflow-microk8s-demo.git
cd kubeflow-microk8s-demo
The Kubeflow project is dedicated to making deployments of machine learning (ML) workflows on Kubernetes simple, portable and scalable. Read more About Kubeflow
This demo will focus on getting started locally with MicroK8s, using Multipass. Source: Getting Started
If you do not already have multipass installed, follow the directions below.
Install Multipass using the native Mac OS installer.
Multipass can be installed with the following command on any snap-enabled linux distribution:
sudo snap install multipass --beta --classic
You can mount a local volume into the VM. The second command mounts your the local kubeflow-demo
directory in the virtual machine at /multipass
.
multipass launch bionic -n kubeflow -m 8G -d 40G -c 4 --cloud-init kubeflow.init && \
multipass mount . kubeflow:/home/multipass/demo
multipass mount ${PWD}/my-app kubeflow:/home/multipass/my-app
Note: These are the minimum recommended settings on the VM created by Multipass for the Kubeflow deployment. You are free to adjust them higher based on your host machine capabilities and workload requirements.
Create or use an existing (Github token)[https://github.com/settings/tokens].
touch secret.env
echo "export GITHUB_TOKEN=<paste your Github token>" > secret.env
Log into the VM and install some basic supporting tools. This will install kubernetes via microk8s, make, ksonnet, and kubeflow.
Set the following environment variables before running install.sh
to configure your setup. If you choose not to provide them, the defaults below will be used.
export NAMESPACE=default # kubernetes namespace
export APP_NAME=my-app
export APP_DIR=/home/multipass/demo/my-app
export KUBEFLOW_TAG=v0.3.3
export KUBEFLOW_SRC=/home/multimass/kubeflow
multipass shell kubeflow # log into vm
source /home/multipass/demo/secret.env # set GITHUB_TOKEN environment variable in vm shell
./demo/install.sh # install microk8s, kubeflow etc.
When you're done with this demo, delete & purge the VM you created.
multipass delete kubeflow && multipass purge