Skip to content

Commit

Permalink
Extend Katib documentation to use not in GKE (kubeflow#2260)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
andreyvelich authored and k8s-ci-robot committed Feb 5, 2019
1 parent 9c90118 commit d95938f
Showing 1 changed file with 41 additions and 7 deletions.
48 changes: 41 additions & 7 deletions kubeflow/katib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,37 @@
**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)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## 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

```
Expand All @@ -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
Expand All @@ -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/).

0 comments on commit d95938f

Please sign in to comment.