Skip to content

Commit

Permalink
Add tensorboard support for local mninst example (kubeflow#616)
Browse files Browse the repository at this point in the history
* Add files via upload

* Update kustomization.yaml

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
eqqe authored and k8s-ci-robot committed Aug 12, 2019
1 parent 22de8cf commit ef94845
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
18 changes: 17 additions & 1 deletion mnist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
- [Using S3](#using-s3)
- [Monitoring](#monitoring)
- [Tensorboard](#tensorboard)
- [Local storage](#local-storage-1)
- [Using GCS](#using-gcs-1)
- [Using S3](#using-s3-1)
- [Deploying TensorBoard](#deploying-tensorboard)
- [Serving the model](#serving-the-model)
- [GCS](#gcs)
- [S3](#s3)
- [Local storage](#local-storage-1)
- [Local storage](#local-storage-2)
- [Web Front End](#web-front-end)
- [Connecting via port forwarding](#connecting-via-port-forwarding)
- [Using IAP on GCP](#using-iap-on-gcp)
Expand Down Expand Up @@ -469,6 +470,21 @@ There are various ways to monitor workflow/training job. In addition to using `k
### Tensorboard
#### Local storage
Enter the `monitoring/local` from the `mnist` application directory.
```
cd monitoring/local
```
Configure PVC name, mount point, and set log directory.
```
kustomize edit add configmap mnist-map-monitoring --from-literal=pvcName=${PVC_NAME}
kustomize edit add configmap mnist-map-monitoring --from-literal=pvcMountPath=/mnt
kustomize edit add configmap mnist-map-monitoring --from-literal=logDir=/mnt
```
#### Using GCS
Enter the `monitoring/GCS` from the `mnist` application directory.
Expand Down
12 changes: 12 additions & 0 deletions mnist/monitoring/local/deployment_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- op: add
path: /spec/template/spec/containers/0/volumeMounts
value:
- mountPath: $(pvcMountPath)
name: local-storage

- op: add
path: /spec/template/spec/volumes
value:
- name: local-storage
persistentVolumeClaim:
claimName: $(pvcName)
30 changes: 30 additions & 0 deletions mnist/monitoring/local/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../base
configurations:
- params.yaml

vars:
- fieldref:
fieldPath: data.pvcName
name: pvcName
objref:
apiVersion: v1
kind: ConfigMap
name: mnist-map-monitoring
- fieldref:
fieldPath: data.pvcMountPath
name: pvcMountPath
objref:
apiVersion: v1
kind: ConfigMap
name: mnist-map-monitoring

patchesJson6902:
- path: deployment_patch.yaml
target:
group: apps
kind: Deployment
name: tensorboard-tb
version: v1beta1
5 changes: 5 additions & 0 deletions mnist/monitoring/local/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
varReference:
- path: spec/template/spec/volumes/persistentVolumeClaim/claimName
kind: Deployment
- path: spec/template/spec/containers/volumeMounts/mountPath
kind: Deployment

0 comments on commit ef94845

Please sign in to comment.