distributed-tensorflow

by joaquinito2051

Helm chartv0.1.1App 1.6.0

A Helm chart for running distributed TensorFlow on Kubernetes

About this chart

Distributed TensorFlow

TensorFlow is an open source software library for numerical computation using data flow graphs, and it supports distributed computing, allowing 'data parallel' or 'model parallel' on different servers. This means data scientists can now scale out distributed training to 100s of GPUs using TensorFlow.

  • https://www.tensorflow.org
  • https://www.tensorflow.org/deploy/distributed

Prerequisites

  • Kubernetes cluster v1.8+

Chart Details

This chart will create a TensorFlow cluster, and distribute a computation graph across that cluster.

Installing the Chart

  • To install the chart with the release name mnist:

    $ helm install --name mnist <helm-repo>/distributed-tensorflow
    

    $ helm install --name mnist incubator/distributed-tensorflow

  • To install with custom values via file:

    $ helm install  --values values.yaml  --name mnist  <helm-repo>/distributed-tensorflow
    

    $ helm install --values values.yaml --name mnist incubator/distributed-tensorflow Below is an example of the custom value file values.yaml with GPU support.

    worker:
      number: 2
      podManagementPolicy: Parallel
      image:
        repository: cheyang/distributed-tf
        tag: 1.6.0-gpu
      port: 9090
      gpuCount: 1
    
    ps:
      number: 2
      podManagementPolicy: Parallel
      image:
        repository: cheyang/distributed-tf
        tag: 1.6.0
        pullPolicy: IfNotPresent
      port: 8080
    
    # optimize for training
    hyperparams:
      batchsize: 20
      learningrate: 0.001
    

Notice: you can check the details of docker image from Docker hub

Uninstalling the Chart

  • To uninstall/delete the mnist deployment:

    $ helm delete mnist
    

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Service Distributed Tensorflow chart and their default values.

ParameterDescriptionDefault
worker.image.repositoryTensorFlow Worker Server's image repositorycheyang/distributed-tf
worker.image.tagTensorFlow Worker Server's image taggpu
worker.image.pullPolicyimage pullPolicy for the workerIfNotPresent
worker.gpuCountSet the gpu to be allocated and allowed for the Pods0
ps.image.repositoryTensorFlow Parameter Server's image repositorycheyang/distributed-tf
ps.image.tagTensorFlow Parameter Server's image tag1.6.0-gpu
ps.image.pullPolicyimage pullPolicy for the psIfNotPresent

Deploy distributed-tensorflow with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has distributed-tensorflow on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdistributed-tensorflow is pinned at v0.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply