Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ephemeral workloads with Docker.
Search
pvergain
February 07, 2015
Technology
0
220
Ephemeral workloads with Docker.
Talk at PyTennessee on tmpnb, IPython, Jupyter, cloudpipe, and ephemeral workloads with Docker.
pvergain
February 07, 2015
Tweet
Share
More Decks by pvergain
See All by pvergain
Jupyter project
pvergain
0
44
Hitchhikers Guide to Free and Open Source Participation
pvergain
0
32
Six technologies that will change the web platform
pvergain
0
46
Other Decks in Technology
See All in Technology
配列に見る bash と zsh の違い
kazzpapa3
1
150
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.1k
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
610
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
250
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
240
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.5k
AI駆動PjMの理想像 と現在地 -実践例を添えて-
masahiro_okamura
1
110
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
140
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
240
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
AI: The stuff that nobody shows you
jnunemaker
PRO
2
260
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
Why Our Code Smells
bkeepers
PRO
340
58k
Crafting Experiences
bethany
1
49
sira's awesome portfolio website redesign presentation
elsirapls
0
150
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
440
Context Engineering - Making Every Token Count
addyosmani
9
660
エンジニアに許された特別な時間の終わり
watany
106
230k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
53
Transcript
DOCKER FOR EPHEMERAL WORKLOADS Kyle Kelley @ PyTennessee
Hi!
Good morning!
Kyle Kelley @rgbkrk
None
None
None
None
None
None
None
None
♥ I
None
Sharing
None
Deployment 㱺
None
FROM python:3-onbuild CMD [“python”, “./app.py”]
from flask import Flask app = Flask(__name__) ! @app.route('/') def
hello_pytn(): return 'Hello PyTennessee!' ! if __name__ == '__main__': app.run(‘0.0.0.0’)
$ docker build -t pytn .
$ docker build -t pytn . Sending build context to
Docker daemon 92.67 kB Sending build context to Docker daemon Step 0 : FROM python:3-onbuild # Executing 3 build triggers Trigger 0, COPY requirements.txt /usr/src/app/ Step 0 : COPY requirements.txt /usr/src/app/ Trigger 1, RUN pip install -r requirements.txt Step 0 : RUN pip install -r requirements.txt ---> Running in dea1149d79ba … Successfully installed Flask Werkzeug Jinja2 itsdangerous markupsafe Cleaning up...
$ docker build -t pytn . … Trigger 2, COPY
. /usr/src/app Step 0 : COPY . /usr/src/app ---> 6067170ab7fe Removing intermediate container 7ba25a7d8c3b Removing intermediate container dea1149d79ba Removing intermediate container 98f8579edc94 Step 1 : CMD python ./app.py ---> Running in 53031fa4ba6d ---> a7324c447943 Removing intermediate container 53031fa4ba6d Successfully built a7324c447943
$ docker build -t pytn .
$ docker run -p 5000:5000 pytn * Running on http://*:5000/
(Press CTRL+C to quit)
None
$ docker run ipython/scipystack
ipython/ipython ipython/scipystack ipython/notebook ipython/scipyserver
None
None
None
None
“Could we do a live demo for Nature?”
“Yes?”
None
JUPYTERHUB IN ACTION Kyle visits /user/rgbkrk/ to reach his
notebook server
CONFIGURABLE HTTP PROXY • Based on node-http-proxy • Proxy routes
to localhost, external IPs, etc. • /user/123/ → 127.0.0.1:56790 • Provides an administrative API for adding routes • POST /api/routes/[:path]
github.com/jupyter/ configurable-http-proxy
None
None
None
“Yes!”
github.com/jupyter/tmpnb
/user/reqz/ /user/asdf/ /user/uiop/ :59678 :59632 :59680 Configurable HTTP Proxy
None
tmpnb.org
bit.ly/inature
> 20,000 notebook servers
None
None
None
None
None
What else is ephemeral?
compute jobs
None
>>> import cloud >>> def add(x, y): ...
return x+y >>> add(1, 2) 3 >>> jid = cloud.call(add, ... 1, 2)
! >>> cloud.result(jid) 3
>>> import cloud >>> def scrape(x,y): ...
# Expensive operation >>> xs = [] # list of x’s >>> ys = [] # list of y’s >>> jids = cloud.map(scrape, ... xs, ys)
>>> cloud.result(jids)
PICLOUD • Chuck a python pickle to the cloud (f,
args, kwargs) = pickle.load(sys.stdin) res = f(*args, **kwargs) ! cloudpickle.dump(res, open("/tmp/.result", "wb"))
Acquisition
None
:(
None
?
github.com/cloudpipe
None
import multyvac ! # Connect to the cluster
multyvac.config.set_key( api_key=rackspace_user, api_secret_key=rackspace_api_key, api_url=‘https://api.cloudpi.pe/v1’) ! ! ! !
CLOUDPIPE • Docker Backed • Processes run as non-root •
API compatible with multyvac
CLOUDPIPE • Open Source • Want Need Python 3 binding,
new cloud pickler • Node library in the works
Where else can we take things?
Where else can we take things?
On Demand IPython kernels
github.com/ rgbkrk/kernels- service
bit.ly/oreillyjupyter
FRONTIER • Put kernels close to data stores, spin out
compute • IPython parallel on demand • Compute jobs on demand • Trigger jobs by events
None
JOIN MY TEAM
[email protected]
JOIN RACKSPACE
[email protected]