From d95938f48dc38901ad530fa228f35cd152286ebe Mon Sep 17 00:00:00 2001 From: Andrey Velichkevich Date: Mon, 4 Feb 2019 17:53:33 -0800 Subject: [PATCH] Extend Katib documentation to use not in GKE (#2260) * Add deploying Katib not in GKE in README * Fix context * Add context * Move section for using Katib not in GKE * Fix README * Fix README * Change name for TF operator Add doc link for Persistent Volume --- kubeflow/katib/README.md | 48 ++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/kubeflow/katib/README.md b/kubeflow/katib/README.md index 6f405d32c3f..19c84d9202e 100644 --- a/kubeflow/katib/README.md +++ b/kubeflow/katib/README.md @@ -7,8 +7,8 @@ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [Quickstart](#quickstart) - - [TF-job operator](#tf-job-operator) - - [Pytorch-operator](#pytorch-operator) + - [TF operator](#tf-operator) + - [Pytorch operator](#pytorch-operator) - [Katib](#katib) - [Cleanups](#cleanups) @@ -16,27 +16,28 @@ ## Quickstart -For running Katib you have to install tf-job operator and pytorch operator package. +For running Katib, you have to install tf operator and pytorch operator package. In your Ksonnet app root, run the following ``` export KF_ENV=default +ks env set ${KF_ENV} --namespace=kubeflow ks registry add kubeflow github.com/kubeflow/kubeflow/tree/master/kubeflow ``` -### TF-job operator +### TF operator -For installing tf-job operator, run the following +For installing tf operator, run the following ``` ks pkg install kubeflow/tf-training -ks pkg install kubeflow/core +ks pkg install kubeflow/common ks generate tf-job-operator tf-job-operator ks apply ${KF_ENV} -c tf-job-operator ``` -### Pytorch-operator +### Pytorch operator For installing pytorch operator, run the following ``` @@ -55,6 +56,33 @@ ks generate katib katib ks apply ${KF_ENV} -c katib ``` +If you want to use Katib not in GKE and you don't have StorageClass for dynamic volume provisioning at your cluster, you have to create persistent volume to bound your persistent volume claim. For additional information about persistent volume, visit Kubernetes [documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/). + +This is yaml file for persistent volume + +```yaml +apiVersion: v1 +kind: PersistentVolume +metadata: + name: katib-mysql + labels: + type: local + app: katib +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + hostPath: + path: /data/katib +``` + +Create this pv after deploying Katib package + +``` +kubectl create -f https://raw.githubusercontent.com/kubeflow/katib/master/manifests/pv/pv.yaml +``` + ### Cleanups Delete installed components @@ -65,5 +93,11 @@ ks delete ${KF_ENV} -c pytorch-operator ks delete ${KF_ENV} -c tf-job-operator ``` +If you create pv for Katib, delete it + +``` +kubectl delete -f https://raw.githubusercontent.com/kubeflow/katib/master/manifests/pv/pv.yaml +``` + Please refer to the official docs for [Hyperparameter Tuning at kubeflow.org](https://www.kubeflow.org/docs/guides/components/hyperparameter/).