SlideShare a Scribd company logo
Scaling Notebooks for
Deep Learning
workloads
Luciano Resende
JupyterCon - 2018
1© 2018 IBM Corporation
About me - Luciano Resende
2
Open Source AI Platform Architect – IBM – CODAIT
• Senior Technical Staff Member at IBM, contributing to open source for over 10 years
• Currently contributing to : Jupyter Notebook ecosystem, Apache Bahir, Apache
Toree, Apache Spark among other projects related to AI/ML platforms
lresende@us.ibm.com
https://www.linkedin.com/in/lresende
@lresende1975
https://github.com/lresende
© 2018 IBM Corporation
Jupyter Notebooks
Overview
3© 2018 IBM Corporation
Jupyter Notebooks
© 2018 IBM Corporation 4
Notebooks are interactive
computational
environments, in which
you can combine code
execution, rich text,
mathematics, plots and
rich media.
Jupyter Notebooks
© 2018 IBM Corporation 5
• Notebook UI runs on the browser
• The Notebook Server serves the
’Notebooks’
• Kernels interpret/execute cell
contents
– Are responsible for code execution
– Abstracts different languages
– 1:1 relationship with Notebook
– Runs and consume resources as long as
notebook is running
Jupyter Notebooks
and Deep Learning
6© 2018 IBM Corporation
Deep Learning workloads
© 2018 IBM Corporation 7
Resource Intensive workloads
Requires expensive hardware (GPUs)
Long Running training jobs
- Simple MNIST takes over one hour
WITHOUT a decent GPU
- Other non complex deep learning model
training can easily take over a day
WITH GPUs
Jupyter & Kubernetes
© 2018 IBM Corporation 8
Kubernetes Platform
- Containers provides a flexible way to
deploy applications and are here to stay
- Kubernetes enables easy management
of containerized applications and
resources with the benefit of Elasticity
and Quality of Services
Source: https://github.com/Langhalsdino/Kubernetes-GPU-Guide
Enterprise Gateway & Kubernetes
© 2018 IBM Corporation
Supported Platforms
FfDL
Before Enterprise Gateway After Enterprise Gateway
Before Jupyter Enterprise Gateway …
• Resources required for all kernels needs to
be allocated during Notebook Server pod
creation
• Resources limited to what is physically
available on the host node that runs all
kernels and associated Spark drivers
After Jupyter Enterprise Gateway …
• Gateway pod very lightweight
• Kernels in their own pod, isolation
• Kernel pods built from community images:
Spark-on-K8s, TensorFlow, Keras, etc.
Jupyter Enterprise Gateway - Kubernetes
© 2018 IBM Corporation 10
Container images defined in kernelspec
Community image
Kernel
Spark on K8
Kernel
Distributed
File
System
Vanilla Kernels
Spark based kernels
Gateway
nb2kg
nb2kg
Deep Learning Platforms
© 2018 IBM Corporation 11
Prohibited costs
- Deep Learning resources are prohibitive in
costs to be locked/idle during interactive
development
Deep Learning Platforms
- We have seen the rise of Deep Learning
platforms that leverage containers and
Kubernetes as the basis of their
infrastructure
- Kubernetes enables Deep Learning
platforms to easily share and restrict
accelerated hardware
Fabric for Deep Learning
IBM Watson Studio
Deep Learning as a service
Batch
oriented
developm
ent
Deep Learning Workspace
March 30 2018 / © 2018 IBM Corporation 12
Streamline Data Science user experience when
coming from Notebook/Interactive
development interfaces
• Current process include multiple steps, one
being decomposing the notebook into an
application that needs to be submitted as a
zip to the deep learning runtime which
becomes a show stopper for data scientists
to adopt FfDL and DLaas
March 30 2018 / © 2018 IBM Corporation 13
Streamline the Deep Learning application
lifecycle
• Run local notebook experiments, with small data
samples and seamlessly validate experiments on
Deep Learning environments
• IBM Cloud DLaaS, FfDL (open source), KubeFlow
(open source)
Simplify productionalization of Model training
and serving from Notebooks
• Enable running/scheduling notebooks on
production environments as batch jobs
• Results can be made available via updated
notebook, or exported to html, pdf and a few
other formats.
Interactive development
lifecycle done on
commodity hardware
with sampled data
Training on full dataset
gets scheduled as
batch jobs on deep
learning infrastructure
Deep Learning Workspace
14March 30 2018 / © 2018 IBM Corporation
March 30 2018 / © 2018 IBM Corporation 15
• User select where to run the
experiment
• Job is packaged and submitted on
behalf of user
• User has access to Job Console to
monitor experiment
Deep Learning Workspace
March 30 2018 / © 2018 IBM Corporation
Deep Learning Extensions
Notebook Extension (button)
https://github.com/lresende/enterprise_scheduler_extension
Notebook Scheduler (backend)
https://github.com/lresende/enterprise_scheduler
16
Enable interactive development on
commodity hardware while easily
enabling model training on Deep
Learning infrastructure with GPU based
hardware.
Deep Learning Workspace
17March 30 2018 / © 2018 IBM Corporation
BACKUP
SLIDES
18© 2018 IBM Corporation
Jupyter Enterprise Gateway
19© 2018 IBM Corporation
Jupyter Enterprise
Gateway
© 2018 IBM Corporation
Jupyter Enterprise Gateway at IBM Code
https://developer.ibm.com/code/openprojects/jupyter-enterprise-gateway/
Jupyter Enterprise Gateway source code at GitHub
https://github.com/jupyter-incubator/enterprise_gateway
Jupyter Enterprise Gateway Documentation
http://jupyter-enterprise-gateway.readthedocs.io/en/latest/
Supported Kernels
Supported Platforms
20
A lightweight, multi-tenant, scalable
and secure gateway that enables
Jupyter Notebooks to share resources
across an Apache Spark or Kubernetes
cluster for Enterprise/Cloud use cases
Spectrum Conductor
+
Jupyter Enterprise Gateway Features
© 2018 IBM Corporation
Gather
Data
Analyze
Data
Machine
Learning
Deep
Learning
Deploy
Model
Maintain
Model
Python
Data Science
Stack
Fabric for
Deep Learning
(FfDL)
Mleap +
PFA
Scikit-LearnPandas
Apache
Spark
Apache
Spark
Jupyter
Model
Asset
eXchange
Keras +
Tensorflow
21
16
32
48
64
0
10
20
30
40
50
60
70
80
4 Nodes 8 Nodes 12 Nodes 16 NodesMaxKernels(4GBHeap)
Cluster Size (32GB Nodes)
MAXIMUM NUMBER OF
SIMULTANEOUS KERNELS
Optimized Resource Allocation
– Utilize resources on all cluster nodes by running kernels as Spark
applications in YARN Cluster Mode.
– Pluggable architecture to enable support for additional Resource Managers
Enhanced Security
– End-to-End secure communications
• Secure socket communications
• Encrypted HTTP communication using SSL
Multiuser support with user impersonation
– Enhance security and sandboxing by enabling user impersonation when
running kernels (using Kerberos).
– Individual HDFS home folder for each notebook user.
– Use the same user ID for notebook and batch jobs.
Kernel
Kernel
Kernel
Kernel
Kernel
Kernel
Kernel
Kernel
Kernel
Jupyter Enterprise Gateway – YARN
© 2018 IBM Corporation 22
YARN Cluster
YARN
Workers
Gateway Node
Jupyter Enterprise Gateway
• Multitenancy
• Remote kernel lifecycle management via process proxies
Spark Executors
Spark Executors
Spark Executors
Yarn Container
Jupyter Kernel
Spark Driver
Impersonation:
Alice’s kernel runs
under Alice’s user ID.
Spark Executors
Spark Executors
Spark Executors
Yarn Container
Jupyter Kernel
Spark Driver
SecurityLayer
nb2kg
nb2kg
Spark Executors
Spark Executors
Spark Executors
Yarn Container
Jupyter Kernel
Spark Driver
Bob
Alice
Enterprise Gateway & Kubernetes
© 2018 IBM Corporation
Supported Platforms
FfDL
Before Enterprise Gateway After Enterprise Gateway
Before Jupyter Enterprise Gateway …
• Resources required for all kernels needs to
be allocated during Notebook Server pod
creation
• Resources limited to what is physically
available on the host node that runs all
kernels and associated Spark drivers
After Jupyter Enterprise Gateway …
• Gateway pod very lightweight
• Kernels in their own pod, isolation
• Kernel pods built from community images:
Spark-on-K8s, TensorFlow, Keras, etc.
Jupyter Enterprise Gateway - Kubernetes
© 2018 IBM Corporation 24
Container images defined in kernelspec
Community image
Kernel
Spark on K8
Kernel
Distributed
File
System
Vanilla Kernels
Spark based kernels
Gateway
nb2kg
nb2kg
The Secret Sauce:
Process Proxies mixed with Kernel Launchers
© 2018 IBM Corporation
Process Proxy:
• Abstracts kernel process represented by Jupyter
framework
• Pluggable class definition identified in kernelspec
(kernel.json)
• Manages kernel lifecycle
Kernel Launcher:
• Embeds target kernel
• Listens on gateway communication port
• Conveys interrupt requests (via local signal)
• Could be extended for additional communications
{
"language": "python",
"display_name": "Spark - Python (Kubernetes Mode)",
"process_proxy": {
"class_name":
"enterprise_gateway.services.processproxies.k8s.KubernetesProcessP
roxy",
"config": {
"image_name": "elyra/kubernetes-kernel-py:dev",
"executor_image_name": "elyra/kubernetes-kernel-py:dev”,
"port_range" : "40000..42000"
}
},
"env": {
"SPARK_HOME": "/opt/spark",
"SPARK_OPTS": "--master k8s://https://${KUBERNETES_SERVICE_HOST
--deploy-mode cluster --name …",
…
},
"argv": [
"/usr/local/share/jupyter/kernels/spark_python_kubernetes/bin/run.
sh",
"{connection_file}",
"--RemoteProcessProxy.response-address",
"{response_address}",
"--RemoteProcessProxy.spark-context-initialization-mode",
"lazy"
]
}
26March 30 2018 / © 2018 IBM Corporation

More Related Content

What's hot (20)

PDF
Building distribution packages with Docker
Bruno Cornec
 
PDF
Training Ensimag OpenStack 2016
Bruno Cornec
 
DOC
KarthikSNOW_CV
karthik reddy
 
PDF
Hadoop Everywhere & Cloudbreak
Sean Roberts
 
PDF
Herding your cattle from dev to ops
Bastiaan Schaap
 
PPTX
Private Cloud with Open Stack, Docker
Davinder Kohli
 
PPTX
Open Stack Cloud Services
Saurabh Gupta
 
PPTX
Kubeflow: portable and scalable machine learning using Jupyterhub and Kuberne...
Akash Tandon
 
PPTX
Hadoop on Docker
Rakesh Saha
 
PDF
HP and linux
Bruno Cornec
 
PPTX
Automated Lifecycle Management - CloudFoundry on OpenStack
Animesh Singh
 
PDF
Kubeflow Distributed Training and HPO
Animesh Singh
 
PDF
C418 - Build, Deploy and Manage Your First Open Pattern with PureApplication ...
Hendrik van Run
 
PPTX
AWS Summit London 2019 - Containers on AWS
Massimo Ferre'
 
PPTX
.docker : how to deploy Digital Experience in a container drinking a cup of c...
Andrea Fontana
 
PPTX
OpenCL Overview Japan Virtual Open House Feb 2021
The Khronos Group Inc.
 
PPTX
Vulkan ML Japan Virtual Open House Feb 2021
The Khronos Group Inc.
 
PDF
Raspberry Pi - Lecture 1 Introduction
Mohamed Abdallah
 
PDF
"An Update on Open Standard APIs for Vision Processing," a Presentation from ...
Edge AI and Vision Alliance
 
PPTX
Cloud native buildpacks_collabnix
Suman Chakraborty
 
Building distribution packages with Docker
Bruno Cornec
 
Training Ensimag OpenStack 2016
Bruno Cornec
 
KarthikSNOW_CV
karthik reddy
 
Hadoop Everywhere & Cloudbreak
Sean Roberts
 
Herding your cattle from dev to ops
Bastiaan Schaap
 
Private Cloud with Open Stack, Docker
Davinder Kohli
 
Open Stack Cloud Services
Saurabh Gupta
 
Kubeflow: portable and scalable machine learning using Jupyterhub and Kuberne...
Akash Tandon
 
Hadoop on Docker
Rakesh Saha
 
HP and linux
Bruno Cornec
 
Automated Lifecycle Management - CloudFoundry on OpenStack
Animesh Singh
 
Kubeflow Distributed Training and HPO
Animesh Singh
 
C418 - Build, Deploy and Manage Your First Open Pattern with PureApplication ...
Hendrik van Run
 
AWS Summit London 2019 - Containers on AWS
Massimo Ferre'
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
Andrea Fontana
 
OpenCL Overview Japan Virtual Open House Feb 2021
The Khronos Group Inc.
 
Vulkan ML Japan Virtual Open House Feb 2021
The Khronos Group Inc.
 
Raspberry Pi - Lecture 1 Introduction
Mohamed Abdallah
 
"An Update on Open Standard APIs for Vision Processing," a Presentation from ...
Edge AI and Vision Alliance
 
Cloud native buildpacks_collabnix
Suman Chakraborty
 

Similar to Scaling notebooks for Deep Learning workloads (20)

PDF
Jupyter con meetup extended jupyter kernel gateway
Luciano Resende
 
PDF
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Luciano Resende
 
PDF
An Enterprise Analytics Platform with Jupyter Notebooks and Apache Spark
Luciano Resende
 
PDF
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017
Luciano Resende
 
PPT
Enabling a hardware accelerated deep learning data science experience for Apa...
DataWorks Summit
 
PDF
The Analytic Platform behind IBM’s Watson Data Platform by Luciano Resende a...
Big Data Spain
 
PDF
Big analytics meetup - Extended Jupyter Kernel Gateway
Luciano Resende
 
PPTX
Inteligencia artificial, open source e IBM Call for Code
Luciano Resende
 
PPTX
2018 02 20-jeg_index
Chester Chen
 
PDF
Enabling a hardware accelerated deep learning data science experience for Apa...
Indrajit Poddar
 
PPTX
IBM COE AI Lab at your University
Ganesan Narayanasamy
 
PDF
Transparent Hardware Acceleration for Deep Learning
Indrajit Poddar
 
PDF
Supporting Highly Multitenant Spark Notebook Workloads with Craig Ingram and ...
Spark Summit
 
PDF
20151015 zagreb spark_notebooks
Andrey Vykhodtsev
 
PDF
Deploying Apache Spark and testing big data applications on servers powered b...
Principled Technologies
 
PPTX
AI lab using IBM Power Systems
Ganesan Narayanasamy
 
PPTX
Introduction to PowerAI - The Enterprise AI Platform
Indrajit Poddar
 
PDF
Distributed deep learning reference architecture v3.2l
Ganesan Narayanasamy
 
PDF
Data science apps powered by Jupyter Notebooks
Natalino Busa
 
PDF
AI Scalability for the Next Decade
Paula Koziol
 
Jupyter con meetup extended jupyter kernel gateway
Luciano Resende
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Luciano Resende
 
An Enterprise Analytics Platform with Jupyter Notebooks and Apache Spark
Luciano Resende
 
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017
Luciano Resende
 
Enabling a hardware accelerated deep learning data science experience for Apa...
DataWorks Summit
 
The Analytic Platform behind IBM’s Watson Data Platform by Luciano Resende a...
Big Data Spain
 
Big analytics meetup - Extended Jupyter Kernel Gateway
Luciano Resende
 
Inteligencia artificial, open source e IBM Call for Code
Luciano Resende
 
2018 02 20-jeg_index
Chester Chen
 
Enabling a hardware accelerated deep learning data science experience for Apa...
Indrajit Poddar
 
IBM COE AI Lab at your University
Ganesan Narayanasamy
 
Transparent Hardware Acceleration for Deep Learning
Indrajit Poddar
 
Supporting Highly Multitenant Spark Notebook Workloads with Craig Ingram and ...
Spark Summit
 
20151015 zagreb spark_notebooks
Andrey Vykhodtsev
 
Deploying Apache Spark and testing big data applications on servers powered b...
Principled Technologies
 
AI lab using IBM Power Systems
Ganesan Narayanasamy
 
Introduction to PowerAI - The Enterprise AI Platform
Indrajit Poddar
 
Distributed deep learning reference architecture v3.2l
Ganesan Narayanasamy
 
Data science apps powered by Jupyter Notebooks
Natalino Busa
 
AI Scalability for the Next Decade
Paula Koziol
 
Ad

More from Luciano Resende (19)

PDF
A Jupyter kernel for Scala and Apache Spark.pdf
Luciano Resende
 
PDF
From Data to AI - Silicon Valley Open Source projects come to you - Madrid me...
Luciano Resende
 
PDF
IoT Applications and Patterns using Apache Spark & Apache Bahir
Luciano Resende
 
PDF
Getting insights from IoT data with Apache Spark and Apache Bahir
Luciano Resende
 
PDF
Open Source AI - News and examples
Luciano Resende
 
PDF
Building iot applications with Apache Spark and Apache Bahir
Luciano Resende
 
PDF
What's new in Apache SystemML - Declarative Machine Learning
Luciano Resende
 
PDF
Writing Apache Spark and Apache Flink Applications Using Apache Bahir
Luciano Resende
 
PDF
How mentoring can help you start contributing to open source
Luciano Resende
 
PDF
SystemML - Declarative Machine Learning
Luciano Resende
 
PDF
Luciano Resende's keynote at Apache big data conference
Luciano Resende
 
PPT
Asf icfoss-mentoring
Luciano Resende
 
PDF
Open Source tools overview
Luciano Resende
 
PDF
Data access layer and schema definitions
Luciano Resende
 
PDF
How mentoring programs can help newcomers get started with open source
Luciano Resende
 
PDF
Building RESTful services using SCA and JAX-RS
Luciano Resende
 
PDF
SCA Reaches the Cloud
Luciano Resende
 
PDF
Building apps with tuscany
Luciano Resende
 
PDF
S314011 - Developing Composite Applications for the Cloud with Apache Tuscany
Luciano Resende
 
A Jupyter kernel for Scala and Apache Spark.pdf
Luciano Resende
 
From Data to AI - Silicon Valley Open Source projects come to you - Madrid me...
Luciano Resende
 
IoT Applications and Patterns using Apache Spark & Apache Bahir
Luciano Resende
 
Getting insights from IoT data with Apache Spark and Apache Bahir
Luciano Resende
 
Open Source AI - News and examples
Luciano Resende
 
Building iot applications with Apache Spark and Apache Bahir
Luciano Resende
 
What's new in Apache SystemML - Declarative Machine Learning
Luciano Resende
 
Writing Apache Spark and Apache Flink Applications Using Apache Bahir
Luciano Resende
 
How mentoring can help you start contributing to open source
Luciano Resende
 
SystemML - Declarative Machine Learning
Luciano Resende
 
Luciano Resende's keynote at Apache big data conference
Luciano Resende
 
Asf icfoss-mentoring
Luciano Resende
 
Open Source tools overview
Luciano Resende
 
Data access layer and schema definitions
Luciano Resende
 
How mentoring programs can help newcomers get started with open source
Luciano Resende
 
Building RESTful services using SCA and JAX-RS
Luciano Resende
 
SCA Reaches the Cloud
Luciano Resende
 
Building apps with tuscany
Luciano Resende
 
S314011 - Developing Composite Applications for the Cloud with Apache Tuscany
Luciano Resende
 
Ad

Recently uploaded (20)

PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
PPTX
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
PDF
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
PPTX
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PPTX
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
PDF
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
PDF
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
PDF
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
PPTX
How Can Reporting Tools Improve Marketing Performance.pptx
Varsha Nayak
 
PPTX
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
PDF
Australian Enterprises Need Project Service Automation
Navision India
 
PDF
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
PDF
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
 
PDF
Simplify React app login with asgardeo-sdk
vaibhav289687
 
PDF
custom development enhancement | Togglenow.pdf
aswinisuhu
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
How Can Reporting Tools Improve Marketing Performance.pptx
Varsha Nayak
 
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
Australian Enterprises Need Project Service Automation
Navision India
 
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
 
Simplify React app login with asgardeo-sdk
vaibhav289687
 
custom development enhancement | Togglenow.pdf
aswinisuhu
 

Scaling notebooks for Deep Learning workloads

  • 1. Scaling Notebooks for Deep Learning workloads Luciano Resende JupyterCon - 2018 1© 2018 IBM Corporation
  • 2. About me - Luciano Resende 2 Open Source AI Platform Architect – IBM – CODAIT • Senior Technical Staff Member at IBM, contributing to open source for over 10 years • Currently contributing to : Jupyter Notebook ecosystem, Apache Bahir, Apache Toree, Apache Spark among other projects related to AI/ML platforms [email protected] https://www.linkedin.com/in/lresende @lresende1975 https://github.com/lresende © 2018 IBM Corporation
  • 4. Jupyter Notebooks © 2018 IBM Corporation 4 Notebooks are interactive computational environments, in which you can combine code execution, rich text, mathematics, plots and rich media.
  • 5. Jupyter Notebooks © 2018 IBM Corporation 5 • Notebook UI runs on the browser • The Notebook Server serves the ’Notebooks’ • Kernels interpret/execute cell contents – Are responsible for code execution – Abstracts different languages – 1:1 relationship with Notebook – Runs and consume resources as long as notebook is running
  • 6. Jupyter Notebooks and Deep Learning 6© 2018 IBM Corporation
  • 7. Deep Learning workloads © 2018 IBM Corporation 7 Resource Intensive workloads Requires expensive hardware (GPUs) Long Running training jobs - Simple MNIST takes over one hour WITHOUT a decent GPU - Other non complex deep learning model training can easily take over a day WITH GPUs
  • 8. Jupyter & Kubernetes © 2018 IBM Corporation 8 Kubernetes Platform - Containers provides a flexible way to deploy applications and are here to stay - Kubernetes enables easy management of containerized applications and resources with the benefit of Elasticity and Quality of Services Source: https://github.com/Langhalsdino/Kubernetes-GPU-Guide
  • 9. Enterprise Gateway & Kubernetes © 2018 IBM Corporation Supported Platforms FfDL Before Enterprise Gateway After Enterprise Gateway Before Jupyter Enterprise Gateway … • Resources required for all kernels needs to be allocated during Notebook Server pod creation • Resources limited to what is physically available on the host node that runs all kernels and associated Spark drivers After Jupyter Enterprise Gateway … • Gateway pod very lightweight • Kernels in their own pod, isolation • Kernel pods built from community images: Spark-on-K8s, TensorFlow, Keras, etc.
  • 10. Jupyter Enterprise Gateway - Kubernetes © 2018 IBM Corporation 10 Container images defined in kernelspec Community image Kernel Spark on K8 Kernel Distributed File System Vanilla Kernels Spark based kernels Gateway nb2kg nb2kg
  • 11. Deep Learning Platforms © 2018 IBM Corporation 11 Prohibited costs - Deep Learning resources are prohibitive in costs to be locked/idle during interactive development Deep Learning Platforms - We have seen the rise of Deep Learning platforms that leverage containers and Kubernetes as the basis of their infrastructure - Kubernetes enables Deep Learning platforms to easily share and restrict accelerated hardware Fabric for Deep Learning IBM Watson Studio Deep Learning as a service Batch oriented developm ent
  • 12. Deep Learning Workspace March 30 2018 / © 2018 IBM Corporation 12 Streamline Data Science user experience when coming from Notebook/Interactive development interfaces • Current process include multiple steps, one being decomposing the notebook into an application that needs to be submitted as a zip to the deep learning runtime which becomes a show stopper for data scientists to adopt FfDL and DLaas
  • 13. March 30 2018 / © 2018 IBM Corporation 13 Streamline the Deep Learning application lifecycle • Run local notebook experiments, with small data samples and seamlessly validate experiments on Deep Learning environments • IBM Cloud DLaaS, FfDL (open source), KubeFlow (open source) Simplify productionalization of Model training and serving from Notebooks • Enable running/scheduling notebooks on production environments as batch jobs • Results can be made available via updated notebook, or exported to html, pdf and a few other formats. Interactive development lifecycle done on commodity hardware with sampled data Training on full dataset gets scheduled as batch jobs on deep learning infrastructure Deep Learning Workspace
  • 14. 14March 30 2018 / © 2018 IBM Corporation
  • 15. March 30 2018 / © 2018 IBM Corporation 15 • User select where to run the experiment • Job is packaged and submitted on behalf of user • User has access to Job Console to monitor experiment Deep Learning Workspace
  • 16. March 30 2018 / © 2018 IBM Corporation Deep Learning Extensions Notebook Extension (button) https://github.com/lresende/enterprise_scheduler_extension Notebook Scheduler (backend) https://github.com/lresende/enterprise_scheduler 16 Enable interactive development on commodity hardware while easily enabling model training on Deep Learning infrastructure with GPU based hardware. Deep Learning Workspace
  • 17. 17March 30 2018 / © 2018 IBM Corporation
  • 19. Jupyter Enterprise Gateway 19© 2018 IBM Corporation
  • 20. Jupyter Enterprise Gateway © 2018 IBM Corporation Jupyter Enterprise Gateway at IBM Code https://developer.ibm.com/code/openprojects/jupyter-enterprise-gateway/ Jupyter Enterprise Gateway source code at GitHub https://github.com/jupyter-incubator/enterprise_gateway Jupyter Enterprise Gateway Documentation http://jupyter-enterprise-gateway.readthedocs.io/en/latest/ Supported Kernels Supported Platforms 20 A lightweight, multi-tenant, scalable and secure gateway that enables Jupyter Notebooks to share resources across an Apache Spark or Kubernetes cluster for Enterprise/Cloud use cases Spectrum Conductor +
  • 21. Jupyter Enterprise Gateway Features © 2018 IBM Corporation Gather Data Analyze Data Machine Learning Deep Learning Deploy Model Maintain Model Python Data Science Stack Fabric for Deep Learning (FfDL) Mleap + PFA Scikit-LearnPandas Apache Spark Apache Spark Jupyter Model Asset eXchange Keras + Tensorflow 21 16 32 48 64 0 10 20 30 40 50 60 70 80 4 Nodes 8 Nodes 12 Nodes 16 NodesMaxKernels(4GBHeap) Cluster Size (32GB Nodes) MAXIMUM NUMBER OF SIMULTANEOUS KERNELS Optimized Resource Allocation – Utilize resources on all cluster nodes by running kernels as Spark applications in YARN Cluster Mode. – Pluggable architecture to enable support for additional Resource Managers Enhanced Security – End-to-End secure communications • Secure socket communications • Encrypted HTTP communication using SSL Multiuser support with user impersonation – Enhance security and sandboxing by enabling user impersonation when running kernels (using Kerberos). – Individual HDFS home folder for each notebook user. – Use the same user ID for notebook and batch jobs. Kernel Kernel Kernel Kernel Kernel Kernel Kernel Kernel Kernel
  • 22. Jupyter Enterprise Gateway – YARN © 2018 IBM Corporation 22 YARN Cluster YARN Workers Gateway Node Jupyter Enterprise Gateway • Multitenancy • Remote kernel lifecycle management via process proxies Spark Executors Spark Executors Spark Executors Yarn Container Jupyter Kernel Spark Driver Impersonation: Alice’s kernel runs under Alice’s user ID. Spark Executors Spark Executors Spark Executors Yarn Container Jupyter Kernel Spark Driver SecurityLayer nb2kg nb2kg Spark Executors Spark Executors Spark Executors Yarn Container Jupyter Kernel Spark Driver Bob Alice
  • 23. Enterprise Gateway & Kubernetes © 2018 IBM Corporation Supported Platforms FfDL Before Enterprise Gateway After Enterprise Gateway Before Jupyter Enterprise Gateway … • Resources required for all kernels needs to be allocated during Notebook Server pod creation • Resources limited to what is physically available on the host node that runs all kernels and associated Spark drivers After Jupyter Enterprise Gateway … • Gateway pod very lightweight • Kernels in their own pod, isolation • Kernel pods built from community images: Spark-on-K8s, TensorFlow, Keras, etc.
  • 24. Jupyter Enterprise Gateway - Kubernetes © 2018 IBM Corporation 24 Container images defined in kernelspec Community image Kernel Spark on K8 Kernel Distributed File System Vanilla Kernels Spark based kernels Gateway nb2kg nb2kg
  • 25. The Secret Sauce: Process Proxies mixed with Kernel Launchers © 2018 IBM Corporation Process Proxy: • Abstracts kernel process represented by Jupyter framework • Pluggable class definition identified in kernelspec (kernel.json) • Manages kernel lifecycle Kernel Launcher: • Embeds target kernel • Listens on gateway communication port • Conveys interrupt requests (via local signal) • Could be extended for additional communications { "language": "python", "display_name": "Spark - Python (Kubernetes Mode)", "process_proxy": { "class_name": "enterprise_gateway.services.processproxies.k8s.KubernetesProcessP roxy", "config": { "image_name": "elyra/kubernetes-kernel-py:dev", "executor_image_name": "elyra/kubernetes-kernel-py:dev”, "port_range" : "40000..42000" } }, "env": { "SPARK_HOME": "/opt/spark", "SPARK_OPTS": "--master k8s://https://${KUBERNETES_SERVICE_HOST --deploy-mode cluster --name …", … }, "argv": [ "/usr/local/share/jupyter/kernels/spark_python_kubernetes/bin/run. sh", "{connection_file}", "--RemoteProcessProxy.response-address", "{response_address}", "--RemoteProcessProxy.spark-context-initialization-mode", "lazy" ] }
  • 26. 26March 30 2018 / © 2018 IBM Corporation