Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Miggi preview
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
cindy
February 01, 2017
22
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Miggi preview
cindy
February 01, 2017
Featured
See All Featured
Design in an AI World
tapps
1
350
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
RailsConf 2023
tenderlove
30
1.6k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Six Lessons from altMBA
skipperchong
29
4.5k
WCS-LA-2024
lcolladotor
0
890
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
It's Worth the Effort
3n
188
29k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Transcript
The Python Deployment Albatross CINDY SRIDHARAN @COPYCONSTRUCT PYTENNESSEE FEBRUARY 5,
2017 NASHVILLE, TN
What’s our goal?
Hermetically sealed, uniform, reproducible Python artifacts
Hermetically sealed
• Isolate pure Python dependencies • Isolate compile time native/non-
Python dependencies • Isolate runtime native/non-Python dependencies
uniform
Output of the build process is platform agnostic
Reproducible
Reproducible builds are a set of software development practices that
create a verifiable path from human readable source code to the binary code used by computers.
referential transparency An expression is said to be referentially transparent
if evaluating it gives the same value for same arguments. Such functions are called pure functions.
WHEELS VIRTUALENV PEX DOCKER CONDA NIX
wheels
but before wheels there were …
.whl extension built distribution
no build system needed on target host no C compiler
required wheels
wheels no arbitrary code execution like sdists Ergo faster installation
pip also caches wheels
ergo less tied to a specific version of Python Creates
.pyc files as a part of the installation wheels
None
None
virtualenv
helps “isolate Python environments”
Copies /bin/python and modifies sys.prefix and sys.exec_ prefix
virtualenv ✓ Isolates per-project pure Python dependencies from one another
virtualenv ✓ Isolates per-project pure Python dependencies from system Python
✓Isolates headers and shared libraries *if these are packaked* virtualenv
greenlet.h is installed local to the virtualenv
… as is greenlet.so
Where virtualenv falls short Uses system provided headers and .so
files if not packaged
- - relocatable doesn’t always work
dh-virtualenv
PEX
docker
CONDA
NIX
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
@copyconstruct