SlideShare a Scribd company logo
Build and Deploy Scientific
Python
Applications
SciPy India 2014|IIT Bombay
Ramakrishna Reddy Yekulla
http://ramkrsna.net/
@ramkrsna
Prerequisites
● Have written python or any applications
● Basic Linux Commands
How is this talk going to go about
● Binary Interfaces and Stability
● Python packaging for Application
Developer
● Packaging your Scipy app for *nix based OS
● Deployments | Docker
Application Binary Interfaces
● An application binary interface (ABI) is the interface between two program
modules, one of which is often a library or operating system, at the level of
machine code. An ABI determines such details as how functions are called
and in which binary format information should be passed from one program
component to the next, or to the operating system in the case of a system
call.
● Adhering to ABIs (which may or may not be officially standardized) is usually
the job of the compiler, OS or library writer, but application programmers
may have to deal with ABIs directly when writing programs in a mix of
programming languages, using foreign function call interfaces between them.
● ABIs differ from application programming interfaces (APIs), which
similarly define interfaces between program components, but at the
source code level.
Operating System Stability
● Filesystem Reliability
● Glibc Interfaces ~9000 Stable Interfaces
● Robust Tested Software both by the
community
and Enterprise Software Industry
Operating System Stability
● Separation of concerns
● Reliability
● Repeatability.
● Ease of use.
● Built it, Run it.
● Tools of the trade ::
Binutils – readelf, objdump, nm, c+
+filt
Elfutils – eureadelf, euobjdump, eu
nm
System Packaging Solutions
● GNU/Linux :: apt-get | dpkg, yum | RPM
● Windows :: npackd | chocolatey
● Mac OS X :: homebrew | macports
What Every Developer Needs to
Know about Memory
● Ulrich Drepper
What Every Python Developer
should be aware of..
● distutils
● buildout
● virtualenv
● pip
● setup.py develop
● **conda
Virtualenv
Setting up the virtualenv can take a significant amount of time
because it pulls down packages from PyPI. I was surprised that it does
not try to use the locally installed packages. One way to speed up the
rebuild is to use a local caching mirror of PyPI. This can be
accomplished by using devpi.
●
Step 1:
Install devpi package
sudo pip install devpi
●
Step 2: Add the following lines in your /root/.pip/pip.conf file
[global]
index-url = http://localhost:3141/rooint/pypi/+simple/
extra-index-url = https://pypi.python.org/simple/
Python Apps on Distributions
● RPM's Based Deployments
● Software Collections
● Context based Security Benefits
● PACKER | Virt-Builder
General Rule Of Packaging
●
MAJOR version when you make incompatible API changes
●
MINOR version when you add functionality in a backwards-compatible
manner, and
●
PATCH version when you make backwards-compatible bug fixes.
● Additional labels for pre-release and build metadata are available as
extensions to the MAJOR.MINOR.PATCH format.
http://semver.org
https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/
http://nvie.com/posts/pin-your-packages/
Fedora
● In Fedora we have multiple python runtimes, one for
each supported major release. At this point that's
one for python2.x and one for python3.x
● Each runtime corresponds to a binary of the form
● /usr/bin/python$MAJOR.$MINOR
● One of these python runtimes is the "system runtime"
which is what we run when invoking
● All python runtimes have a virtual provide for
● python(abi) = $MAJOR-$MINOR .
● /usr/bin/python .
● On Fedora 20 this is
● /usr/bin/python2.7
Package Versioning
● MAJOR version when you make incompatible API changes
● MINOR version when you add functionality in a backwards-compatible
manner, and
● PATCH version when you make backwards-compatible bug fixes.
● Additional labels for pre-release and build metadata are available as
extensions to the MAJOR.MINOR.PATCH format.
http://semver.org
https://access.redhat.com/documentation/en-US/Red_Hat_Software_Co
llections/
http://nvie.com/posts/pin-your-packages/
Typical Dev Setup
● Vagrant, virtualenv, virtualenvwrapper
● Zero configuration Python/Unix web based teaching env ::
https://github.com/ptone/jiffylab
● Another Approach for Dev Environment ::
http://collaboratool.berkeley.edu
Typical Deploy Setup
● BCFG2, Python-based but XML-infested.
● CFEngine
● Ansible, Python-based, gaining a lot of traction lately
● Chef, Puppet ( Ruby Based)
● Salt, Python
● Juju, Ubuntu
● Docker
Thank You
Questions ?!
42@ramkrsna.net

More Related Content

What's hot (20)

PDF
TSC Sponsored BoF: Can Linux and Automotive Functional Safety Mix ? Take 2: T...
Linaro
 
PDF
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
Linaro
 
PDF
Kernel Recipes 2017 - Developing an embedded video application on dual Linux ...
Anne Nicolas
 
PPTX
Kivy report
shobhit bhatnagar
 
PDF
Development Boards for Tizen IoT
Samsung Open Source Group
 
ODP
Os Grossupdated
oscon2007
 
PDF
LAS16-109: LAS16-109: The status quo and the future of 96Boards
Linaro
 
PDF
BKK16-212: What's broken on ARM64?
Linaro
 
PPTX
Edge and ai
Vishwas N
 
PDF
LAS16-305: Smart City Big Data Visualization on 96Boards
Linaro
 
PDF
A low cost, real-time algorithm for embedded devices based on freertos kernel
eSAT Journals
 
PPTX
Server Side Swift
Software Infrastructure
 
PDF
Embedded Operating System - Linux
Emertxe Information Technologies Pvt Ltd
 
PDF
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
Giovanni Toraldo
 
PDF
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
Linaro
 
PDF
Embedded Linux - Building toolchain
Emertxe Information Technologies Pvt Ltd
 
PDF
Debugging Python with gdb
Roman Podoliaka
 
PDF
ASP.NET on zLinux: A New Workload
Novell
 
PDF
Masters porting linux
Shashank Asthana
 
TSC Sponsored BoF: Can Linux and Automotive Functional Safety Mix ? Take 2: T...
Linaro
 
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
Linaro
 
Kernel Recipes 2017 - Developing an embedded video application on dual Linux ...
Anne Nicolas
 
Kivy report
shobhit bhatnagar
 
Development Boards for Tizen IoT
Samsung Open Source Group
 
Os Grossupdated
oscon2007
 
LAS16-109: LAS16-109: The status quo and the future of 96Boards
Linaro
 
BKK16-212: What's broken on ARM64?
Linaro
 
Edge and ai
Vishwas N
 
LAS16-305: Smart City Big Data Visualization on 96Boards
Linaro
 
A low cost, real-time algorithm for embedded devices based on freertos kernel
eSAT Journals
 
Server Side Swift
Software Infrastructure
 
Embedded Operating System - Linux
Emertxe Information Technologies Pvt Ltd
 
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
Giovanni Toraldo
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
Linaro
 
Embedded Linux - Building toolchain
Emertxe Information Technologies Pvt Ltd
 
Debugging Python with gdb
Roman Podoliaka
 
ASP.NET on zLinux: A New Workload
Novell
 
Masters porting linux
Shashank Asthana
 

Viewers also liked (20)

PDF
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
PDF
PythonIntro_pycon2010
Kannappan Sirchabesan
 
PPT
Linux
Hema Prasanth
 
PDF
Tutorial on-python-programming
Chetan Giridhar
 
PPTX
MySQL database
lalit choudhary
 
PPT
Php Ppt
Hema Prasanth
 
PPT
Web 2 0 Ppt
Hema Prasanth
 
PPT
Mysql Ppt
Hema Prasanth
 
PPT
Linux basic commands
MohanKumar Palanichamy
 
PPTX
Mysql an introduction
Mohd yasin Karim
 
PPT
MySQL Features & Implementation
OSSCube
 
PPTX
MySQL DBA
lalit choudhary
 
PDF
Quick Guide with Linux Command Line
Anuchit Chalothorn
 
PPTX
Basic commands of linux
shravan saini
 
PDF
Linux Basic Commands
Hanan Nmr
 
PPTX
Linux Kernel Programming
Nalin Sharma
 
PPT
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
PPT
Mysql ppt
Sanmuga Nathan
 
PDF
Basic linux commands
Shakeel Shafiq
 
PPT
MYSQL.ppt
webhostingguy
 
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
PythonIntro_pycon2010
Kannappan Sirchabesan
 
Tutorial on-python-programming
Chetan Giridhar
 
MySQL database
lalit choudhary
 
Php Ppt
Hema Prasanth
 
Web 2 0 Ppt
Hema Prasanth
 
Mysql Ppt
Hema Prasanth
 
Linux basic commands
MohanKumar Palanichamy
 
Mysql an introduction
Mohd yasin Karim
 
MySQL Features & Implementation
OSSCube
 
MySQL DBA
lalit choudhary
 
Quick Guide with Linux Command Line
Anuchit Chalothorn
 
Basic commands of linux
shravan saini
 
Linux Basic Commands
Hanan Nmr
 
Linux Kernel Programming
Nalin Sharma
 
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
Mysql ppt
Sanmuga Nathan
 
Basic linux commands
Shakeel Shafiq
 
MYSQL.ppt
webhostingguy
 
Ad

Similar to Build and deploy scientific Python Applications (20)

PDF
Building Good Containers for Python Applications
All Things Open
 
PDF
Developing In Python On Red Hat Platforms (Nick Coghlan & Graham Dumpleton)
Red Hat Developers
 
PDF
Developing in Python on Red Hat Platforms (DevNation 2016)
ncoghlan_dev
 
PDF
Effectively using Open Source with conda
Travis Oliphant
 
PDF
Virtualenv
WEBdeBS
 
PDF
Welcome to the Cheese Shop: setuptools, virtualenv and PyPUG
dwvisser
 
PDF
$ make install
Marios Isaakidis
 
ODP
5 minute intro to virtualenv
amenasse
 
ODP
Python-specific packaging
dwvisser
 
PPTX
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...
The University of Queensland
 
PDF
Package Management via Spack on SJTU π Supercomputer
Jianwen Wei
 
PPTX
spack_hpc.pptx
Object Automation
 
PDF
Engineer Engineering Software
Yung-Yu Chen
 
PPTX
Run Python on windows
Sitthykun LY
 
PPT
10 11-hart installing pythonsoftware
William Hart
 
PPTX
Python on pi
swee meng ng
 
PDF
Using Python Packages - An Overview
Daniel Hepper
 
PDF
Django Dev Environment Howto
Tzu-ping Chung
 
PDF
Smau Milano 2016 - Fabio Alessandro Locati
SMAU
 
PDF
PyCon 2013 : Scripting to PyPi to GitHub and More
Matt Harrison
 
Building Good Containers for Python Applications
All Things Open
 
Developing In Python On Red Hat Platforms (Nick Coghlan & Graham Dumpleton)
Red Hat Developers
 
Developing in Python on Red Hat Platforms (DevNation 2016)
ncoghlan_dev
 
Effectively using Open Source with conda
Travis Oliphant
 
Virtualenv
WEBdeBS
 
Welcome to the Cheese Shop: setuptools, virtualenv and PyPUG
dwvisser
 
$ make install
Marios Isaakidis
 
5 minute intro to virtualenv
amenasse
 
Python-specific packaging
dwvisser
 
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...
The University of Queensland
 
Package Management via Spack on SJTU π Supercomputer
Jianwen Wei
 
spack_hpc.pptx
Object Automation
 
Engineer Engineering Software
Yung-Yu Chen
 
Run Python on windows
Sitthykun LY
 
10 11-hart installing pythonsoftware
William Hart
 
Python on pi
swee meng ng
 
Using Python Packages - An Overview
Daniel Hepper
 
Django Dev Environment Howto
Tzu-ping Chung
 
Smau Milano 2016 - Fabio Alessandro Locati
SMAU
 
PyCon 2013 : Scripting to PyPi to GitHub and More
Matt Harrison
 
Ad

Recently uploaded (20)

PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 

Build and deploy scientific Python Applications

  • 1. Build and Deploy Scientific Python Applications SciPy India 2014|IIT Bombay Ramakrishna Reddy Yekulla http://ramkrsna.net/ @ramkrsna
  • 2. Prerequisites ● Have written python or any applications ● Basic Linux Commands
  • 3. How is this talk going to go about ● Binary Interfaces and Stability ● Python packaging for Application Developer ● Packaging your Scipy app for *nix based OS ● Deployments | Docker
  • 4. Application Binary Interfaces ● An application binary interface (ABI) is the interface between two program modules, one of which is often a library or operating system, at the level of machine code. An ABI determines such details as how functions are called and in which binary format information should be passed from one program component to the next, or to the operating system in the case of a system call. ● Adhering to ABIs (which may or may not be officially standardized) is usually the job of the compiler, OS or library writer, but application programmers may have to deal with ABIs directly when writing programs in a mix of programming languages, using foreign function call interfaces between them. ● ABIs differ from application programming interfaces (APIs), which similarly define interfaces between program components, but at the source code level.
  • 5. Operating System Stability ● Filesystem Reliability ● Glibc Interfaces ~9000 Stable Interfaces ● Robust Tested Software both by the community and Enterprise Software Industry
  • 6. Operating System Stability ● Separation of concerns ● Reliability ● Repeatability. ● Ease of use. ● Built it, Run it. ● Tools of the trade :: Binutils – readelf, objdump, nm, c+ +filt Elfutils – eureadelf, euobjdump, eu nm
  • 7. System Packaging Solutions ● GNU/Linux :: apt-get | dpkg, yum | RPM ● Windows :: npackd | chocolatey ● Mac OS X :: homebrew | macports
  • 8. What Every Developer Needs to Know about Memory ● Ulrich Drepper
  • 9. What Every Python Developer should be aware of.. ● distutils ● buildout ● virtualenv ● pip ● setup.py develop ● **conda
  • 10. Virtualenv Setting up the virtualenv can take a significant amount of time because it pulls down packages from PyPI. I was surprised that it does not try to use the locally installed packages. One way to speed up the rebuild is to use a local caching mirror of PyPI. This can be accomplished by using devpi. ● Step 1: Install devpi package sudo pip install devpi ● Step 2: Add the following lines in your /root/.pip/pip.conf file [global] index-url = http://localhost:3141/rooint/pypi/+simple/ extra-index-url = https://pypi.python.org/simple/
  • 11. Python Apps on Distributions ● RPM's Based Deployments ● Software Collections ● Context based Security Benefits ● PACKER | Virt-Builder
  • 12. General Rule Of Packaging ● MAJOR version when you make incompatible API changes ● MINOR version when you add functionality in a backwards-compatible manner, and ● PATCH version when you make backwards-compatible bug fixes. ● Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. http://semver.org https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/ http://nvie.com/posts/pin-your-packages/
  • 13. Fedora ● In Fedora we have multiple python runtimes, one for each supported major release. At this point that's one for python2.x and one for python3.x ● Each runtime corresponds to a binary of the form ● /usr/bin/python$MAJOR.$MINOR ● One of these python runtimes is the "system runtime" which is what we run when invoking ● All python runtimes have a virtual provide for ● python(abi) = $MAJOR-$MINOR . ● /usr/bin/python . ● On Fedora 20 this is ● /usr/bin/python2.7
  • 14. Package Versioning ● MAJOR version when you make incompatible API changes ● MINOR version when you add functionality in a backwards-compatible manner, and ● PATCH version when you make backwards-compatible bug fixes. ● Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. http://semver.org https://access.redhat.com/documentation/en-US/Red_Hat_Software_Co llections/ http://nvie.com/posts/pin-your-packages/
  • 15. Typical Dev Setup ● Vagrant, virtualenv, virtualenvwrapper ● Zero configuration Python/Unix web based teaching env :: https://github.com/ptone/jiffylab ● Another Approach for Dev Environment :: http://collaboratool.berkeley.edu
  • 16. Typical Deploy Setup ● BCFG2, Python-based but XML-infested. ● CFEngine ● Ansible, Python-based, gaining a lot of traction lately ● Chef, Puppet ( Ruby Based) ● Salt, Python ● Juju, Ubuntu ● Docker