SlideShare a Scribd company logo
Clustering Tensor
Flow con
Kubernetes y
Raspberry Pi
Andres L Martinez
@davilagrau
Photo by William Felker on Unsplash
almo
Google Developer Program Lead PAN EU
@davilagrau
https://www.linkedin.com/in/aleonar
https://www.instagram.com/davilagrau
https://github.com/almo
https://www.facebook.com/davilagrau
Lucas Käldström’s Motivation
● Kubernetes’ Dev Community
○ committer
○ maintainer
● Main motivations
○ Learning Google’s
technologies
○ Developing Open Source
○ Re-use old/cheap HW
Photo by Ken Treloar on Unsplash
● Hyperparameter tuning
○ Auto ML
● Scaling on QPS
○ ML API
● Ensemble learning
● Data Parallelism
Model Parallelism?
Don’t ask, don’t tell
So
why not?
Raspberry Pi
Raspberry Pi 3
● Single-board computer
● ARM 1.2 GHz 64/32-bit quad-core
○ VFPv4 Floating Point Unit
onboard (per core)
○ Hardware virtualization support
● 1 GB LPDDR2 RAM at 900 MHz
● MicroSDHC slot
● Bluetooth 4.1
● 2.4 GHz WiFi 802.11n & Ethernet
10/100
Kubernetes
Kubernetes
● Kubernetes is an open-source system
for automating deployment, scaling,
and management of containerized
applications.
● Horizontal scaling
● Service discovery and load balancing
● Self-healing
Tensor Flow
TensorFlow
● TensorFlow is an open source
software library for numerical
computation using data flow
graphs.
● TensorFlow has APIs available in
C++, Python, Java and Go.
● TensorFlow has also bindings
for: C#, Haskell, Julia, Ruby, Rust,
and Scala.
● TensorFlow Lite is TensorFlow’s
lightweight solution for mobile
and embedded devices
Raspberry Pi version
is coming soon!
Architecture
HypriotOS HypriotOS HypriotOS HypriotOS
Kubernetes
Cluster
Tensor Flow
Cluster
Cluster
Kubernetes
Setting Kubernetes up!
Master
Kubeadm
Node #2
Node#1
Node#3
Kubelet
Docker
KubeletDocker
Kubelet
Docker
Setting up the master
Settings
● OS: Installing Docker on Raspbian OR
○ Download and flash HypriotOS v1.7.1 from
https://goo.gl/y9Jyzd
● Setting up Kubernetes repositories
○ Key / Source
Master
Kubeadm
Commands
● apt-get update && apt-get install -y kubeadm
● echo `cat /boot/cmdline.txt` cgroup_enable=cpuset >
/boot/cmdline.txt
● swapoff -a #Note: Kubernetes 1.8
● kubeadm init --pod-network-cidr 10.244.0.0/16
Setting up the node (each)
Settings
● OS: Installing Docker on Raspbian OR
○ Download and flash HypriotOS v1.7.1 from
https://goo.gl/y9Jyzd
● Setting up Kubernetes repositories
○ Key / Source
Commands
● apt-get update && apt-get install -y kubeadm
● echo `cat /boot/cmdline.txt` cgroup_enable=cpuset
> /boot/cmdline.txt
● swapoff -a #Note: Kubernetes 1.8
● kubeadm join --token=XXXXX Master-IP
Node #2
Kubelet
Docker
Setting the network
Flannel: flannel is a virtual network that
gives a subnet to each host for use with
container runtimes
“Platforms like Google's Kubernetes assume that
each container (pod) has a unique, routable IP inside
the cluster. The advantage of this model is that it
reduces the complexity of doing port mapping”
Let’s scale with
Ansible Scripts https://github.com/lahsivjar/kube-arm
Cluster
Tensor Flow
Parallelization Strategies
Distributed TensorFlow
Explicit (device block): TensorFlow will insert
the appropriate data transfers between the jobs.
with tf.device(“/cpu:0”):
a = tf.Variable(3.0)
b = tf.Variable(3.0)
c = a * b
Parallelization strategies:
● In-graph replication
● Between-graph replication
● Asynchronous training
● Synchronous training
TensorFlow Serving
It might be also
a function
TensorFlow Cluster
A TensorFlow "cluster" is a set of "tasks" that participate
in the distributed execution of a TensorFlow graph.
Steps:
1. Create a tf.train.ClusterSpec that describes all of the
tasks in the cluster. This should be the same for each
task.
2. Create a tf.train.Server, passing the
tf.train.ClusterSpec to the constructor, and identifying
the local task with a job name and task index.
TensorFlow Cluster
Node #0
tf.train.ClusterSpec({
"worker": [
"worker0.example.com:2222",
"worker1.example.com:2222"
],
"ps": [
"ps0.example.com:2222",
"ps1.example.com:2222"
]})
Worker
Node #1
Worker
Node #1
PS
Node #0
PS
Setting up TensorFlow Cluster I
Node #1
PS
Node #0
PS $ python trainer.py 
--ps_hosts=ps0.example.com:2222,ps1.example.com:2222 
--worker_hosts=worker0.example.com:2222,worker1.example.com:2222 
--job_name=ps --task_index=0
$ python trainer.py 
--ps_hosts=ps0.example.com:2222,ps1.example.com:2222 
--worker_hosts=worker0.example.com:2222,worker1.example.com:2222 
--job_name=ps --task_index=1
Example: Between-graph replication / Asynchronous training
Setting up TensorFlow Cluster II
Node #1
Worker
Node #0
Worker $ python trainer.py 
--ps_hosts=ps0.example.com:2222,ps1.example.com:2222 
--worker_hosts=worker0.example.com:2222,worker1.example.com:2222 
--job_name=worker --task_index=0
$ python trainer.py 
--ps_hosts=ps0.example.com:2222,ps1.example.com:2222 
--worker_hosts=worker0.example.com:2222,worker1.example.com:2222 
--job_name=worker --task_index=1
Sharding Variables in Multiples Parameters Servers
with tf.device(tf.train.replica_device_setter())
with
tf.train.MonitoredTrainingSession(master=server.target,
is_chief=(FLAGS.task_index == 0),
checkpoint_dir="/tmp/train_logs",
hooks=hooks) as mon_sess:
Node #1
PS Node #2
PS
Node #0
PS
Docker Image
CPU Only i.e. Raspberry Pi
● TensorFlow 1.1 https://goo.gl/URUpko
● Official TensorFlow Lite for Raspberry Pi,
Coming Soon! https://goo.gl/viqtuQ
● resin/rpi-raspbian + tensorflow 1.4
Coming soon!
PET!
Putting Everything
Together
Pod Controllers: Stateful Sets (PS & Workers)
● Manages the deployment and
scaling of a set of Pods.
● Provides guarantees about the
ordering and uniqueness of
these Pods.
● StatefulSet manages Pods that
are based on an identical
container spec.
● StatefulSet maintains a sticky
identity for each of their Pods.
StatefulSet
#0
Node #1
PS
Node #0
PS
Node #1
Worker
Node #0
Worker
StatefulSet
#1
Cluster Scalability
+1
Rolling
Update!
WorkersPS
WorkersPS
(Kubernetes)
TensorFlow
Thank you!
Questions?
Andres L Martinez
@davilagrau
Setting the cluster I
$ kubectl run hypriot --image=hypriot/rpi-busybox-httpd --replicas=3 --port=80
$ kubectl expose deployment hypriot --port 80
$ kubectl get endpoints hypriot
1
2
3
Setting the cluster II
$ kubectl apply -f traefik-ingress-controller.yaml
$ kubectl label node IP nginx-controller=traefik
$ kubectl apply -f cluster-ingress.yaml
1
2
3
$ cat cluster-ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: hypriot
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: hypriot
servicePort: 80
Kubernetes: orquestación de imagenes de Rasberri Pi
para el despliegue de tensorflow server.
Description:
Structure:
- Use case: IoT / processing information
- Architecture Kubernetes + Tensorflow+ rasberri pi
- Python
- Introduction to Kubernetes (Ansible?) (Laura)
- Master / Slave architecture (Laura)
- Container description: labelling and pod matching
(Laura)
- Configuration (Laura)
- Load balancer (Laura)
- round robin HTTP request (Laura)
- Monitoring load of the replicas (Laura)
- Failure tolerance (Laura)
- Introduction to Tensor Flow
- Introduction to TensorFlow / MachineLearning
- Computation Graph
- Introduction to TensorFlow Server
- Development of Use Case
Dashboard
codemotion-1 192.168.1.76 B8:27:EB:E5:9D:A5
codemotion-3 192.168.1.75 B8:27:EB:68:5B:F9
codemotion-4 192.168.1.77 B8:27:EB:1F:EF:29
codemotion-2 192.168.1.78 B8:27:EB:19:38:C3
Laura Morillo-Velarde
● Backend engineer at seedtag
● Twitter: @Laura_Morillo
● WTM Lead at GDG Madrid

More Related Content

What's hot

Unikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayUnikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy Way
ScyllaDB
 
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
VMware Tanzu
 
Startup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionStartup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image Distribution
Kohei Tokunaga
 
Java applications containerized and deployed
Java applications containerized and deployedJava applications containerized and deployed
Java applications containerized and deployed
Anthony Dahanne
 
eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動
Kohei Tokunaga
 
BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話
Kohei Tokunaga
 
Notary - container signing
Notary - container signingNotary - container signing
Notary - container signing
Moby Project
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
DigitalOcean
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Kohei Tokunaga
 
Data Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at ScaleData Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at Scale
ScyllaDB
 
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon GarciaOpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebula Project
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014
lpgauth
 
CraftConf 2019: CRI Runtimes Deep Dive: Who Is Running My Pod?
CraftConf 2019:  CRI Runtimes Deep Dive: Who Is Running My Pod?CraftConf 2019:  CRI Runtimes Deep Dive: Who Is Running My Pod?
CraftConf 2019: CRI Runtimes Deep Dive: Who Is Running My Pod?
Phil Estes
 
Understanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at ScaleUnderstanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at Scale
ScyllaDB
 
HKG18-419 - OpenHPC on Ansible
HKG18-419 - OpenHPC on AnsibleHKG18-419 - OpenHPC on Ansible
HKG18-419 - OpenHPC on Ansible
Linaro
 
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz SnapshotterThe overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
Kohei Tokunaga
 
How to make cloud native platform by kubernetes
How to make cloud native platform by kubernetesHow to make cloud native platform by kubernetes
How to make cloud native platform by kubernetes
어형 이
 
Moby Summit introduction
Moby Summit introductionMoby Summit introduction
Moby Summit introduction
Moby Project
 
Introduction to GPUs in HPC
Introduction to GPUs in HPCIntroduction to GPUs in HPC
Introduction to GPUs in HPC
inside-BigData.com
 
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Kohei Tokunaga
 

What's hot (20)

Unikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayUnikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy Way
 
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
 
Startup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionStartup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image Distribution
 
Java applications containerized and deployed
Java applications containerized and deployedJava applications containerized and deployed
Java applications containerized and deployed
 
eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動
 
BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話
 
Notary - container signing
Notary - container signingNotary - container signing
Notary - container signing
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
 
Data Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at ScaleData Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at Scale
 
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon GarciaOpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014
 
CraftConf 2019: CRI Runtimes Deep Dive: Who Is Running My Pod?
CraftConf 2019:  CRI Runtimes Deep Dive: Who Is Running My Pod?CraftConf 2019:  CRI Runtimes Deep Dive: Who Is Running My Pod?
CraftConf 2019: CRI Runtimes Deep Dive: Who Is Running My Pod?
 
Understanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at ScaleUnderstanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at Scale
 
HKG18-419 - OpenHPC on Ansible
HKG18-419 - OpenHPC on AnsibleHKG18-419 - OpenHPC on Ansible
HKG18-419 - OpenHPC on Ansible
 
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz SnapshotterThe overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
 
How to make cloud native platform by kubernetes
How to make cloud native platform by kubernetesHow to make cloud native platform by kubernetes
How to make cloud native platform by kubernetes
 
Moby Summit introduction
Moby Summit introductionMoby Summit introduction
Moby Summit introduction
 
Introduction to GPUs in HPC
Introduction to GPUs in HPCIntroduction to GPUs in HPC
Introduction to GPUs in HPC
 
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
 

Similar to Clustering tensor flow con kubernetes y raspberry pi

Using Deep Learning Toolkits with Kubernetes clusters
Using Deep Learning Toolkits with Kubernetes clustersUsing Deep Learning Toolkits with Kubernetes clusters
Using Deep Learning Toolkits with Kubernetes clusters
Joy Qiao
 
Distributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob KaralusDistributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Jakob Karalus
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Stanislav Pogrebnyak
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
Stephan Lindauer
 
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
Preferred Networks
 
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinPGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
Equnix Business Solutions
 
How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014
Puppet
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
Bob Killen
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
Holden Karau
 
容器化後,持續交付不可缺的敲門磚 - Helm
容器化後,持續交付不可缺的敲門磚 - Helm容器化後,持續交付不可缺的敲門磚 - Helm
容器化後,持續交付不可缺的敲門磚 - Helm
Hung-Yen Chen
 
High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...
High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...
High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...
Chris Fregly
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
David Timothy Strauss
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kevin Lynch
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Miloš Zubal
 
Using ansible to core os & kubernetes clusters
Using ansible to core os & kubernetes clustersUsing ansible to core os & kubernetes clusters
Using ansible to core os & kubernetes clusters
magicmarkup
 
Scientific Computing @ Fred Hutch
Scientific Computing @ Fred HutchScientific Computing @ Fred Hutch
Scientific Computing @ Fred Hutch
Dirk Petersen
 
Scaling Up Logging and Metrics
Scaling Up Logging and MetricsScaling Up Logging and Metrics
Scaling Up Logging and Metrics
Ricardo Lourenço
 
WKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes ClustersWKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes Clusters
Weaveworks
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
William Stewart
 
Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209
mffiedler
 

Similar to Clustering tensor flow con kubernetes y raspberry pi (20)

Using Deep Learning Toolkits with Kubernetes clusters
Using Deep Learning Toolkits with Kubernetes clustersUsing Deep Learning Toolkits with Kubernetes clusters
Using Deep Learning Toolkits with Kubernetes clusters
 
Distributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob KaralusDistributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob Karalus
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
 
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinPGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
 
How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
 
容器化後,持續交付不可缺的敲門磚 - Helm
容器化後,持續交付不可缺的敲門磚 - Helm容器化後,持續交付不可缺的敲門磚 - Helm
容器化後,持續交付不可缺的敲門磚 - Helm
 
High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...
High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...
High Performance Distributed TensorFlow with GPUs - Nvidia GPU Tech Conferenc...
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Using ansible to core os & kubernetes clusters
Using ansible to core os & kubernetes clustersUsing ansible to core os & kubernetes clusters
Using ansible to core os & kubernetes clusters
 
Scientific Computing @ Fred Hutch
Scientific Computing @ Fred HutchScientific Computing @ Fred Hutch
Scientific Computing @ Fred Hutch
 
Scaling Up Logging and Metrics
Scaling Up Logging and MetricsScaling Up Logging and Metrics
Scaling Up Logging and Metrics
 
WKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes ClustersWKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes Clusters
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209
 

More from Andrés Leonardo Martinez Ortiz

How to plan work for your team
How to plan work for your teamHow to plan work for your team
How to plan work for your team
Andrés Leonardo Martinez Ortiz
 
Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU
Andrés Leonardo Martinez Ortiz
 
Developer journey with classroom
Developer journey with classroomDeveloper journey with classroom
Developer journey with classroom
Andrés Leonardo Martinez Ortiz
 
Better code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloudBetter code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloud
Andrés Leonardo Martinez Ortiz
 
Fostering Google Software Technologies in Open Digital Ecosystems
Fostering Google Software Technologies in Open Digital EcosystemsFostering Google Software Technologies in Open Digital Ecosystems
Fostering Google Software Technologies in Open Digital Ecosystems
Andrés Leonardo Martinez Ortiz
 
Engineering Machine Learning technologies
Engineering Machine Learning technologiesEngineering Machine Learning technologies
Engineering Machine Learning technologies
Andrés Leonardo Martinez Ortiz
 
Google Cloud Online training resources and certification
Google Cloud Online training resources and certificationGoogle Cloud Online training resources and certification
Google Cloud Online training resources and certification
Andrés Leonardo Martinez Ortiz
 
The future of conversation ui
The future of conversation uiThe future of conversation ui
The future of conversation ui
Andrés Leonardo Martinez Ortiz
 
Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies
Andrés Leonardo Martinez Ortiz
 
Artificial learning machine intelligence
Artificial learning   machine intelligenceArtificial learning   machine intelligence
Artificial learning machine intelligence
Andrés Leonardo Martinez Ortiz
 
Curating online content with Google ML API
Curating online content with Google ML API Curating online content with Google ML API
Curating online content with Google ML API
Andrés Leonardo Martinez Ortiz
 
Collaboration! Ramping up the future!
Collaboration! Ramping up the future!Collaboration! Ramping up the future!
Collaboration! Ramping up the future!
Andrés Leonardo Martinez Ortiz
 
Firefox OS Innovating Mobile Platforms
Firefox OS Innovating Mobile PlatformsFirefox OS Innovating Mobile Platforms
Firefox OS Innovating Mobile Platforms
Andrés Leonardo Martinez Ortiz
 
App Circus Developers Economic 2012
App Circus Developers Economic 2012App Circus Developers Economic 2012
App Circus Developers Economic 2012
Andrés Leonardo Martinez Ortiz
 
Blue Via Plataforma De Pagos MóViles Y Ap Is De Red
Blue Via   Plataforma De Pagos MóViles Y Ap Is De RedBlue Via   Plataforma De Pagos MóViles Y Ap Is De Red
Blue Via Plataforma De Pagos MóViles Y Ap Is De Red
Andrés Leonardo Martinez Ortiz
 
BlueVia Developer Economics 2011
BlueVia Developer Economics 2011BlueVia Developer Economics 2011
BlueVia Developer Economics 2011
Andrés Leonardo Martinez Ortiz
 
Economic Impact For Sm Es Of Cloud Technologies
Economic Impact For Sm Es Of Cloud TechnologiesEconomic Impact For Sm Es Of Cloud Technologies
Economic Impact For Sm Es Of Cloud Technologies
Andrés Leonardo Martinez Ortiz
 

More from Andrés Leonardo Martinez Ortiz (20)

How to plan work for your team
How to plan work for your teamHow to plan work for your team
How to plan work for your team
 
Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU
 
Developer journey with classroom
Developer journey with classroomDeveloper journey with classroom
Developer journey with classroom
 
Better code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloudBetter code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloud
 
Fostering Google Software Technologies in Open Digital Ecosystems
Fostering Google Software Technologies in Open Digital EcosystemsFostering Google Software Technologies in Open Digital Ecosystems
Fostering Google Software Technologies in Open Digital Ecosystems
 
Engineering Machine Learning technologies
Engineering Machine Learning technologiesEngineering Machine Learning technologies
Engineering Machine Learning technologies
 
Google Cloud Online training resources and certification
Google Cloud Online training resources and certificationGoogle Cloud Online training resources and certification
Google Cloud Online training resources and certification
 
The future of conversation ui
The future of conversation uiThe future of conversation ui
The future of conversation ui
 
Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies
 
Artificial learning machine intelligence
Artificial learning   machine intelligenceArtificial learning   machine intelligence
Artificial learning machine intelligence
 
Curating online content with Google ML API
Curating online content with Google ML API Curating online content with Google ML API
Curating online content with Google ML API
 
Understanding the apps developer environment
Understanding the apps developer environmentUnderstanding the apps developer environment
Understanding the apps developer environment
 
Collaboration! Ramping up the future!
Collaboration! Ramping up the future!Collaboration! Ramping up the future!
Collaboration! Ramping up the future!
 
Firefox OS Innovating Mobile Platforms
Firefox OS Innovating Mobile PlatformsFirefox OS Innovating Mobile Platforms
Firefox OS Innovating Mobile Platforms
 
Wellsprings of innovation
Wellsprings of innovationWellsprings of innovation
Wellsprings of innovation
 
App Circus Developers Economic 2012
App Circus Developers Economic 2012App Circus Developers Economic 2012
App Circus Developers Economic 2012
 
Blue Via Plataforma De Pagos MóViles Y Ap Is De Red
Blue Via   Plataforma De Pagos MóViles Y Ap Is De RedBlue Via   Plataforma De Pagos MóViles Y Ap Is De Red
Blue Via Plataforma De Pagos MóViles Y Ap Is De Red
 
BlueVia 2012
BlueVia 2012BlueVia 2012
BlueVia 2012
 
BlueVia Developer Economics 2011
BlueVia Developer Economics 2011BlueVia Developer Economics 2011
BlueVia Developer Economics 2011
 
Economic Impact For Sm Es Of Cloud Technologies
Economic Impact For Sm Es Of Cloud TechnologiesEconomic Impact For Sm Es Of Cloud Technologies
Economic Impact For Sm Es Of Cloud Technologies
 

Recently uploaded

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 

Recently uploaded (20)

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 

Clustering tensor flow con kubernetes y raspberry pi

  • 1. Clustering Tensor Flow con Kubernetes y Raspberry Pi Andres L Martinez @davilagrau Photo by William Felker on Unsplash
  • 2. almo Google Developer Program Lead PAN EU @davilagrau https://www.linkedin.com/in/aleonar https://www.instagram.com/davilagrau https://github.com/almo https://www.facebook.com/davilagrau
  • 3. Lucas Käldström’s Motivation ● Kubernetes’ Dev Community ○ committer ○ maintainer ● Main motivations ○ Learning Google’s technologies ○ Developing Open Source ○ Re-use old/cheap HW
  • 4. Photo by Ken Treloar on Unsplash ● Hyperparameter tuning ○ Auto ML ● Scaling on QPS ○ ML API ● Ensemble learning ● Data Parallelism Model Parallelism? Don’t ask, don’t tell
  • 7. Raspberry Pi 3 ● Single-board computer ● ARM 1.2 GHz 64/32-bit quad-core ○ VFPv4 Floating Point Unit onboard (per core) ○ Hardware virtualization support ● 1 GB LPDDR2 RAM at 900 MHz ● MicroSDHC slot ● Bluetooth 4.1 ● 2.4 GHz WiFi 802.11n & Ethernet 10/100
  • 9. Kubernetes ● Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. ● Horizontal scaling ● Service discovery and load balancing ● Self-healing
  • 11. TensorFlow ● TensorFlow is an open source software library for numerical computation using data flow graphs. ● TensorFlow has APIs available in C++, Python, Java and Go. ● TensorFlow has also bindings for: C#, Haskell, Julia, Ruby, Rust, and Scala. ● TensorFlow Lite is TensorFlow’s lightweight solution for mobile and embedded devices Raspberry Pi version is coming soon!
  • 12. Architecture HypriotOS HypriotOS HypriotOS HypriotOS Kubernetes Cluster Tensor Flow Cluster
  • 14. Setting Kubernetes up! Master Kubeadm Node #2 Node#1 Node#3 Kubelet Docker KubeletDocker Kubelet Docker
  • 15. Setting up the master Settings ● OS: Installing Docker on Raspbian OR ○ Download and flash HypriotOS v1.7.1 from https://goo.gl/y9Jyzd ● Setting up Kubernetes repositories ○ Key / Source Master Kubeadm Commands ● apt-get update && apt-get install -y kubeadm ● echo `cat /boot/cmdline.txt` cgroup_enable=cpuset > /boot/cmdline.txt ● swapoff -a #Note: Kubernetes 1.8 ● kubeadm init --pod-network-cidr 10.244.0.0/16
  • 16. Setting up the node (each) Settings ● OS: Installing Docker on Raspbian OR ○ Download and flash HypriotOS v1.7.1 from https://goo.gl/y9Jyzd ● Setting up Kubernetes repositories ○ Key / Source Commands ● apt-get update && apt-get install -y kubeadm ● echo `cat /boot/cmdline.txt` cgroup_enable=cpuset > /boot/cmdline.txt ● swapoff -a #Note: Kubernetes 1.8 ● kubeadm join --token=XXXXX Master-IP Node #2 Kubelet Docker
  • 17. Setting the network Flannel: flannel is a virtual network that gives a subnet to each host for use with container runtimes “Platforms like Google's Kubernetes assume that each container (pod) has a unique, routable IP inside the cluster. The advantage of this model is that it reduces the complexity of doing port mapping”
  • 18. Let’s scale with Ansible Scripts https://github.com/lahsivjar/kube-arm
  • 20. Parallelization Strategies Distributed TensorFlow Explicit (device block): TensorFlow will insert the appropriate data transfers between the jobs. with tf.device(“/cpu:0”): a = tf.Variable(3.0) b = tf.Variable(3.0) c = a * b Parallelization strategies: ● In-graph replication ● Between-graph replication ● Asynchronous training ● Synchronous training TensorFlow Serving It might be also a function
  • 21. TensorFlow Cluster A TensorFlow "cluster" is a set of "tasks" that participate in the distributed execution of a TensorFlow graph. Steps: 1. Create a tf.train.ClusterSpec that describes all of the tasks in the cluster. This should be the same for each task. 2. Create a tf.train.Server, passing the tf.train.ClusterSpec to the constructor, and identifying the local task with a job name and task index.
  • 22. TensorFlow Cluster Node #0 tf.train.ClusterSpec({ "worker": [ "worker0.example.com:2222", "worker1.example.com:2222" ], "ps": [ "ps0.example.com:2222", "ps1.example.com:2222" ]}) Worker Node #1 Worker Node #1 PS Node #0 PS
  • 23. Setting up TensorFlow Cluster I Node #1 PS Node #0 PS $ python trainer.py --ps_hosts=ps0.example.com:2222,ps1.example.com:2222 --worker_hosts=worker0.example.com:2222,worker1.example.com:2222 --job_name=ps --task_index=0 $ python trainer.py --ps_hosts=ps0.example.com:2222,ps1.example.com:2222 --worker_hosts=worker0.example.com:2222,worker1.example.com:2222 --job_name=ps --task_index=1 Example: Between-graph replication / Asynchronous training
  • 24. Setting up TensorFlow Cluster II Node #1 Worker Node #0 Worker $ python trainer.py --ps_hosts=ps0.example.com:2222,ps1.example.com:2222 --worker_hosts=worker0.example.com:2222,worker1.example.com:2222 --job_name=worker --task_index=0 $ python trainer.py --ps_hosts=ps0.example.com:2222,ps1.example.com:2222 --worker_hosts=worker0.example.com:2222,worker1.example.com:2222 --job_name=worker --task_index=1
  • 25. Sharding Variables in Multiples Parameters Servers with tf.device(tf.train.replica_device_setter()) with tf.train.MonitoredTrainingSession(master=server.target, is_chief=(FLAGS.task_index == 0), checkpoint_dir="/tmp/train_logs", hooks=hooks) as mon_sess: Node #1 PS Node #2 PS Node #0 PS
  • 26. Docker Image CPU Only i.e. Raspberry Pi ● TensorFlow 1.1 https://goo.gl/URUpko ● Official TensorFlow Lite for Raspberry Pi, Coming Soon! https://goo.gl/viqtuQ ● resin/rpi-raspbian + tensorflow 1.4 Coming soon!
  • 28. Pod Controllers: Stateful Sets (PS & Workers) ● Manages the deployment and scaling of a set of Pods. ● Provides guarantees about the ordering and uniqueness of these Pods. ● StatefulSet manages Pods that are based on an identical container spec. ● StatefulSet maintains a sticky identity for each of their Pods. StatefulSet #0 Node #1 PS Node #0 PS Node #1 Worker Node #0 Worker StatefulSet #1
  • 30.
  • 31. Thank you! Questions? Andres L Martinez @davilagrau
  • 32. Setting the cluster I $ kubectl run hypriot --image=hypriot/rpi-busybox-httpd --replicas=3 --port=80 $ kubectl expose deployment hypriot --port 80 $ kubectl get endpoints hypriot 1 2 3
  • 33. Setting the cluster II $ kubectl apply -f traefik-ingress-controller.yaml $ kubectl label node IP nginx-controller=traefik $ kubectl apply -f cluster-ingress.yaml 1 2 3 $ cat cluster-ingress.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: hypriot spec: rules: - http: paths: - path: / backend: serviceName: hypriot servicePort: 80
  • 34. Kubernetes: orquestación de imagenes de Rasberri Pi para el despliegue de tensorflow server. Description: Structure: - Use case: IoT / processing information - Architecture Kubernetes + Tensorflow+ rasberri pi - Python - Introduction to Kubernetes (Ansible?) (Laura) - Master / Slave architecture (Laura) - Container description: labelling and pod matching (Laura) - Configuration (Laura) - Load balancer (Laura) - round robin HTTP request (Laura) - Monitoring load of the replicas (Laura) - Failure tolerance (Laura) - Introduction to Tensor Flow - Introduction to TensorFlow / MachineLearning - Computation Graph - Introduction to TensorFlow Server - Development of Use Case
  • 35. Dashboard codemotion-1 192.168.1.76 B8:27:EB:E5:9D:A5 codemotion-3 192.168.1.75 B8:27:EB:68:5B:F9 codemotion-4 192.168.1.77 B8:27:EB:1F:EF:29 codemotion-2 192.168.1.78 B8:27:EB:19:38:C3
  • 36. Laura Morillo-Velarde ● Backend engineer at seedtag ● Twitter: @Laura_Morillo ● WTM Lead at GDG Madrid