tensorflow-inception

by joaquinito2051

Helm chartv0.4.1App 1.4.0

Open source software library for numerical computation using data flow graphs.

About this chart

Tensorflow Inception Model Chart

TensorFlow is an open source software library for numerical computation using data flow graphs.

  • https://www.tensorflow.org/

My hope was to make TensorFlow more accessible by simplifying the following document -- https://tensorflow.github.io/serving/serving_inception.html

Chart Details

This chart will do the following:

  • 1 x TensorFlow inception model server on an external LoadBalancer

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/tensorflow-inception

$ helm install --name my-release incubator/tensorflow-inception

Configuration

The following table lists the configurable parameters of the TensorFlow inception chart and their default values.

ParameterDescriptionDefault
image.repositoryContainer image namequay.io/thomasjungblut/tfs-inception
image.tagContainer image tagtfs-1.8.0-cpu
replicask8s deployment replicas1
componentk8s selector keytensorflow-inception
resourcesSet the resource to be allocated and allowed for the Pods{}
servicePortk8s service port9090
containerPortContainer listening port9090

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Note: For the GPU version, use image.tag=tfs-1.8.0-gpu. Specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

$ helm install --name my-release -f values.yaml <helm-repo>/tensorflow-inception

$ helm install --name my-release -f values.yaml incubator/tensorflow-inception

Tip: You can use the default values.yaml

Example

docker run -v ~/Downloads:/downloads quay.io/lachie83/inception_serving /serving/bazel-bin/tensorflow_serving/example/inception_client --server=$INCEPTION_SERVICE_IP:9090 --image=/downloads/dog.jpg
D1028 17:07:30.650550118       7 ev_posix.c:101]             Using polling engine: poll
outputs {
  key: "classes"
  value {
    dtype: DT_STRING
    tensor_shape {
      dim {
        size: 1
      }
      dim {
        size: 5
      }
    }
    string_val: "golden retriever"
    string_val: "cocker spaniel, English cocker spaniel, cocker"
    string_val: "clumber, clumber spaniel"
    string_val: "tennis ball"
    string_val: "Labrador retriever"
  }
}
outputs {
  key: "scores"
  value {
    dtype: DT_FLOAT
    tensor_shape {
      dim {
        size: 1
      }
      dim {
        size: 5
      }
    }
    float_val: 9.7533788681
    float_val: 6.67022132874
    float_val: 6.18963956833
    float_val: 5.90754127502
    float_val: 5.4464302063
  }
}

E1028 17:07:33.565394639       7 chttp2_transport.c:1810]    close_transport: {"created":"@1477674453.565348591","description":"FD shutdown","file":"src/core/lib/iomgr/ev_poll_posix.c","file_line":427}

Deploy tensorflow-inception with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has tensorflow-inception 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 charttensorflow-inception is pinned at v0.4.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