Distributed Tensorflow in Kubernetes
From ESS-WIKI
Contents
Introduce
Distributed Tensorflow (Clustering) can speed up your training. Distributed tensorflow in kubernates make it easy to:
- Add k8s nodes to extend computing capability
- Simplify the work to make a distributed tensorflow
This topic will describe how to make a distributed tensorflow.
Prerequisite
- You must know the basic concept of distributed tensorflow here: Distributed TensorFlow
- You must know how to write a distributed tensorflow training. Ex: train_and_evaluate
Steps
1. Create(Download) source & Dockerfile (File:Iris train and eval.zip) and unzip to the same folder.
2. Create training container, where "ecgwc" is the username in dockerhub and "tf-iris:dist" is the container name
$ docker build -t ecgwc/tf-iris:dist .
$ docker run --rm ecgwc/tf-iris:dist
$ docker push ecgwc/tf-iris:dist
6. Deploy yaml to k8s
$ kubectl create -f tf-dist-iris.yaml
Reference
https://github.com/Azure/kubeflow-labs/tree/master/7-distributed-tensorflow