DCC workshop: Package and Environment Management for Reproducible Research Software
When: | We 06-11-2024 13:00 - 15:00 |
Where: | CIT Smitsborg, Room 5431.0060 |
The goal of this workshop is:
-
To understand the importance of environment management in ensuring reproducibility.
-
To learn how to use popular tools for managing packages and environments.
-
To gain hands-on experience in setting up and managing environments.
Program Outline:
1. Introduction to Package and Environment Management (15 minutes)
-
Why Environment Management Matters: Discuss the importance of reproducibility in research and how proper environment management plays a crucial role.
-
Challenges in Managing Dependencies: Overview of common issues like dependency conflicts, version control, and platform differences.
-
Overview of Tools: Brief introduction to the tools covered in the workshop: Conda, Virtualenv, Pipenv, and Docker.
2. Managing Python Environments with Conda
-
Introduction to Conda: What is Conda, and why use it?
-
Creating and Managing Environments:
-
Creating a new environment.
-
Installing packages within an environment.
-
Activating and deactivating environments.
-
Exporting and sharing environments (environment.yml
).
-
Hands-on Activity: Participants create and manage a Conda environment for a small Python project.
3. Virtualenv and Pip for Environment Management
-
Introduction to Virtualenv: What it is and how it differs from Conda.
-
Using Virtualenv:
-
Setting up a Virtualenv environment.
-
Installing packages using Pip.
-
Freezing and exporting requirements (requirements.txt
).
-
Introduction to Pipenv: Overview of how Pipenv integrates Pip and Virtualenv.
-
Hands-on Activity: Participants set up an environment using Virtualenv or Pipenv.
4. Containerization with Docker (30 minutes)
-
Introduction to Docker: What is Docker, and why is it useful for environment management?
-
Creating and Using Docker Containers:
-
Basics of Dockerfiles and containerization.
-
Building a Docker image for a Python project.
-
Running and managing Docker containers.
-
Sharing Docker images and containers.
-
Hands-on Activity: Participants create a simple Docker container for a project.
5. Best Practices and Tools Comparison
-
Best Practices: Tips for choosing the right tool for your project and ensuring reproducibility.
-
Tools Comparison: Quick comparison of Conda, Virtualenv, Pipenv, and Docker, including when to use each.
Preparation and Requirements: