SlideShare a Scribd company logo
1 of 17
Why are we going to talk to you
about environments/containers?
Phil Ashton, PGI Advanced Training - KEMRI Wellcome, April 2022
There are two* universally painful parts of
being a bioinformatician:
● Software installation
● Reproducibility
Environments/containers can help solve
both these problems
*at least two
Ease of use for
developers
Ease of use
for users
Hard
Easy
Hard
Easy
apt-get/yum
Some scripts and a
list of dependencies
Traditionally (i.e. before 2016) there was a trade off between the simplicity of making software available and
the simplicity of installing software
Virtual environments and containers provide a “happy medium” - relatively straightforward for both users
and developers
Installation
Reproducibility
“It works on my machine”
“We build our computer systems the way we build our cities: over time, without a plan,
on top of ruins” - Ellen Ullman
The solution is to make our machines as similar as possible, and to start from fresh each time
- environments and containers help us do this
Conda and Conda
environments
(Python) package management is (was?) a mess
https://xkcd.com/1987/
Introduction
to Conda
What is the problem?
● We want to avoid “dependency hell”:
○ I want to run “software A”
○ Software A depends on Software B, C, and D.
○ Software B depends on Software E and F
○ Software C depends on G and H
○ Software D depends on I and J
○ …
What is the solution?
● “Package management”
Enter Anaconda
● Anaconda is a distribution of
Python & R aimed at scientists
that aims to simplify package
management and deployment.
● When you install Anaconda you
get:
○ Python + common scientific
packages
○ Conda (language agnostic)
■ Package manager
■ Environment
manager
● Miniconda is:
○ Python
○ Conda
conda
● Thousands of packages available
to install via conda
● Different “channels” that are the
location where packages are
hosted
● Channels include
○ Bioconda - for bioinformatics software
○ Conda-forge - miscellaneous
community provided packages
● Channels are searched in order
Bioconda
● Conda became a victim of its own success
- as the number of packages increases,
the time taken to “solve the
dependencies” has increased.
○ What is the current state of the software
environment on the computer?
○ What is the desired state of the software
environment (for the new software)?
○ Make an upgrade plan that allows installation of
new software, without breaking existing software.
● Two things slow down conda:
○ Increasing numbers of packages installed on
your computer
○ Increasing number of packages available for
installation.
Mamba
● Mamba is a “drop in” replacement for
conda that is much quicker:
○ `mamba install`
○ `mamba create`
● Uses the libsolv dependency solver and
optimised code in C++
Mamba
Conda environments
● Conda is also an environment manager
● Environments (also known as virtual environments) are a way to have
separate and independent installations of software on the same computer.
● They work by modifying the $PATH variable (very simple explanation).
● Advantages of environments:
○ Software installs quickly (if there isn’t much inside your environment)
○ It’s possible to have software that requires e.g. different versions of the same dependencies.
● Default environment is called `base`
What do you want your base environment to look like?
vs
Limitations of Conda
● Can be differences in dependency resolution solutions between platforms
● Conda environments are not inherently cross-platform
I.e. doesn’t *necessarily* solve the “works on my machine” problem.
Outline of practical
1. Install miniconda
2. Use conda to install mamba
3. Use mamba to install a package into the base environment
4. Use mamba to create a new environment and install software into it
5. Install software into an existing environment
6. Install software from a yaml file
7. Export the specification for an existing environment to a yaml file, and create
a new environment from that file
Acknowledgements & further reading
Anna Price, Cardiff/CLIMB - https://www.youtube.com/watch?v=qORviM_ELdk
Open Software Packaging for Science | by QuantStack | Medium
Python Virtual Environments: A Primer

More Related Content

What's hot

intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdfANIKULSAIKH
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Paige Bailey
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in DetailDamian T. Gordon
 
Introduction to plotting in Python
Introduction to plotting in Python Introduction to plotting in Python
Introduction to plotting in Python bzamecnik
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019Samir Mohanty
 
Anuvaad SUVAS - Document Translation Platform
Anuvaad SUVAS - Document Translation PlatformAnuvaad SUVAS - Document Translation Platform
Anuvaad SUVAS - Document Translation PlatformAravinth Bheemaraj
 
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric LeblondKernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric LeblondAnne Nicolas
 
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)Chinthaka Deshapriya (RHCA)
 
Operating Systems: A History of Linux
Operating Systems: A History of LinuxOperating Systems: A History of Linux
Operating Systems: A History of LinuxDamian T. Gordon
 
CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2Gobinath Subramaniam
 
Introduction to data analysis using python
Introduction to data analysis using pythonIntroduction to data analysis using python
Introduction to data analysis using pythonGuido Luz Percú
 

What's hot (20)

Gnome and kde
Gnome and kdeGnome and kde
Gnome and kde
 
Python introduction
Python introductionPython introduction
Python introduction
 
Numpy tutorial
Numpy tutorialNumpy tutorial
Numpy tutorial
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
 
step by step to install the ubuntu
step by step to install the ubuntustep by step to install the ubuntu
step by step to install the ubuntu
 
Ubuntu OS Presentation
Ubuntu OS PresentationUbuntu OS Presentation
Ubuntu OS Presentation
 
Unix - An Introduction
Unix - An IntroductionUnix - An Introduction
Unix - An Introduction
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
 
Python basic
Python basicPython basic
Python basic
 
How ubuntu works???
How ubuntu works???How ubuntu works???
How ubuntu works???
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in Detail
 
Introduction to plotting in Python
Introduction to plotting in Python Introduction to plotting in Python
Introduction to plotting in Python
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
kali linux.pptx
kali linux.pptxkali linux.pptx
kali linux.pptx
 
Anuvaad SUVAS - Document Translation Platform
Anuvaad SUVAS - Document Translation PlatformAnuvaad SUVAS - Document Translation Platform
Anuvaad SUVAS - Document Translation Platform
 
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric LeblondKernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
 
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
 
Operating Systems: A History of Linux
Operating Systems: A History of LinuxOperating Systems: A History of Linux
Operating Systems: A History of Linux
 
CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2
 
Introduction to data analysis using python
Introduction to data analysis using pythonIntroduction to data analysis using python
Introduction to data analysis using python
 

Similar to 2022.03.23 Conda and Conda environments.pptx

Thinking inside the box (shared)
Thinking inside the box (shared)Thinking inside the box (shared)
Thinking inside the box (shared)Joe Brockmeier
 
Effectively using Open Source with conda
Effectively using Open Source with condaEffectively using Open Source with conda
Effectively using Open Source with condaTravis Oliphant
 
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary SlidesRise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary SlidesDiUS
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications Ramakrishna Reddy
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdfAbid Malik
 
Installing Software, Part 3: Command Line
Installing Software, Part 3: Command LineInstalling Software, Part 3: Command Line
Installing Software, Part 3: Command LineKevin OBrien
 
Why you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxWhy you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxEDB
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip Polstra
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldFederico Capoano
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpAhmed Abdou
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 201244CON
 
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...Russell Pavlicek
 
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdfManaging Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdfAndrew Lamb
 
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...Haggai Philip Zagury
 

Similar to 2022.03.23 Conda and Conda environments.pptx (20)

Thinking inside the box (shared)
Thinking inside the box (shared)Thinking inside the box (shared)
Thinking inside the box (shared)
 
Effectively using Open Source with conda
Effectively using Open Source with condaEffectively using Open Source with conda
Effectively using Open Source with conda
 
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary SlidesRise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdf
 
Installing Software, Part 3: Command Line
Installing Software, Part 3: Command LineInstalling Software, Part 3: Command Line
Installing Software, Part 3: Command Line
 
Why you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxWhy you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on Linux
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
anaconda.pptx
anaconda.pptxanaconda.pptx
anaconda.pptx
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real world
 
Headless Android
Headless AndroidHeadless Android
Headless Android
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in php
 
Polstra 44con2012
Polstra 44con2012Polstra 44con2012
Polstra 44con2012
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012
 
Conda environment system & how to use it on CSUC machines
Conda environment system & how to use it on CSUC machinesConda environment system & how to use it on CSUC machines
Conda environment system & how to use it on CSUC machines
 
Docker 101
Docker 101Docker 101
Docker 101
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
 
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdfManaging Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
 
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
 

More from Philip Ashton

2022.09.26 iNTS household survey.pptx
2022.09.26 iNTS household survey.pptx2022.09.26 iNTS household survey.pptx
2022.09.26 iNTS household survey.pptxPhilip Ashton
 
2022.03.24 Snakemake.pptx
2022.03.24 Snakemake.pptx2022.03.24 Snakemake.pptx
2022.03.24 Snakemake.pptxPhilip Ashton
 
2016.11.08 doherty institute symposium
2016.11.08 doherty institute symposium2016.11.08 doherty institute symposium
2016.11.08 doherty institute symposiumPhilip Ashton
 
2016.03.08 immem talk salmonella outbreaks
2016.03.08 immem talk   salmonella outbreaks2016.03.08 immem talk   salmonella outbreaks
2016.03.08 immem talk salmonella outbreaksPhilip Ashton
 
SnapperDB ASM NGS conference
SnapperDB ASM NGS conferenceSnapperDB ASM NGS conference
SnapperDB ASM NGS conferencePhilip Ashton
 
Whole genome microbiology for Salmonella public health microbiology
Whole genome microbiology for Salmonella public health microbiologyWhole genome microbiology for Salmonella public health microbiology
Whole genome microbiology for Salmonella public health microbiologyPhilip Ashton
 

More from Philip Ashton (6)

2022.09.26 iNTS household survey.pptx
2022.09.26 iNTS household survey.pptx2022.09.26 iNTS household survey.pptx
2022.09.26 iNTS household survey.pptx
 
2022.03.24 Snakemake.pptx
2022.03.24 Snakemake.pptx2022.03.24 Snakemake.pptx
2022.03.24 Snakemake.pptx
 
2016.11.08 doherty institute symposium
2016.11.08 doherty institute symposium2016.11.08 doherty institute symposium
2016.11.08 doherty institute symposium
 
2016.03.08 immem talk salmonella outbreaks
2016.03.08 immem talk   salmonella outbreaks2016.03.08 immem talk   salmonella outbreaks
2016.03.08 immem talk salmonella outbreaks
 
SnapperDB ASM NGS conference
SnapperDB ASM NGS conferenceSnapperDB ASM NGS conference
SnapperDB ASM NGS conference
 
Whole genome microbiology for Salmonella public health microbiology
Whole genome microbiology for Salmonella public health microbiologyWhole genome microbiology for Salmonella public health microbiology
Whole genome microbiology for Salmonella public health microbiology
 

Recently uploaded

Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfmuntazimhurra
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfSumit Kumar yadav
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 

Recently uploaded (20)

Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdf
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdf
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 

2022.03.23 Conda and Conda environments.pptx

  • 1. Why are we going to talk to you about environments/containers? Phil Ashton, PGI Advanced Training - KEMRI Wellcome, April 2022
  • 2. There are two* universally painful parts of being a bioinformatician: ● Software installation ● Reproducibility Environments/containers can help solve both these problems *at least two
  • 3. Ease of use for developers Ease of use for users Hard Easy Hard Easy apt-get/yum Some scripts and a list of dependencies Traditionally (i.e. before 2016) there was a trade off between the simplicity of making software available and the simplicity of installing software Virtual environments and containers provide a “happy medium” - relatively straightforward for both users and developers Installation
  • 4. Reproducibility “It works on my machine” “We build our computer systems the way we build our cities: over time, without a plan, on top of ruins” - Ellen Ullman The solution is to make our machines as similar as possible, and to start from fresh each time - environments and containers help us do this
  • 6. (Python) package management is (was?) a mess https://xkcd.com/1987/
  • 8. What is the problem? ● We want to avoid “dependency hell”: ○ I want to run “software A” ○ Software A depends on Software B, C, and D. ○ Software B depends on Software E and F ○ Software C depends on G and H ○ Software D depends on I and J ○ … What is the solution? ● “Package management”
  • 9. Enter Anaconda ● Anaconda is a distribution of Python & R aimed at scientists that aims to simplify package management and deployment. ● When you install Anaconda you get: ○ Python + common scientific packages ○ Conda (language agnostic) ■ Package manager ■ Environment manager ● Miniconda is: ○ Python ○ Conda
  • 10. conda ● Thousands of packages available to install via conda ● Different “channels” that are the location where packages are hosted ● Channels include ○ Bioconda - for bioinformatics software ○ Conda-forge - miscellaneous community provided packages ● Channels are searched in order Bioconda
  • 11. ● Conda became a victim of its own success - as the number of packages increases, the time taken to “solve the dependencies” has increased. ○ What is the current state of the software environment on the computer? ○ What is the desired state of the software environment (for the new software)? ○ Make an upgrade plan that allows installation of new software, without breaking existing software. ● Two things slow down conda: ○ Increasing numbers of packages installed on your computer ○ Increasing number of packages available for installation. Mamba
  • 12. ● Mamba is a “drop in” replacement for conda that is much quicker: ○ `mamba install` ○ `mamba create` ● Uses the libsolv dependency solver and optimised code in C++ Mamba
  • 13. Conda environments ● Conda is also an environment manager ● Environments (also known as virtual environments) are a way to have separate and independent installations of software on the same computer. ● They work by modifying the $PATH variable (very simple explanation). ● Advantages of environments: ○ Software installs quickly (if there isn’t much inside your environment) ○ It’s possible to have software that requires e.g. different versions of the same dependencies. ● Default environment is called `base`
  • 14. What do you want your base environment to look like? vs
  • 15. Limitations of Conda ● Can be differences in dependency resolution solutions between platforms ● Conda environments are not inherently cross-platform I.e. doesn’t *necessarily* solve the “works on my machine” problem.
  • 16. Outline of practical 1. Install miniconda 2. Use conda to install mamba 3. Use mamba to install a package into the base environment 4. Use mamba to create a new environment and install software into it 5. Install software into an existing environment 6. Install software from a yaml file 7. Export the specification for an existing environment to a yaml file, and create a new environment from that file
  • 17. Acknowledgements & further reading Anna Price, Cardiff/CLIMB - https://www.youtube.com/watch?v=qORviM_ELdk Open Software Packaging for Science | by QuantStack | Medium Python Virtual Environments: A Primer

Editor's Notes

  1. https://medium.com/@QuantStack/open-software-packaging-for-science-61cecee7fc23
  2. https://realpython.com/python-virtual-environments-a-primer/