Skip to content

Add comprehensive Python package installation guide for Apptainer containers#2278

Merged
sr320 merged 1 commit intomasterfrom
copilot/fix-2277
Aug 20, 2025
Merged

Add comprehensive Python package installation guide for Apptainer containers#2278
sr320 merged 1 commit intomasterfrom
copilot/fix-2277

Conversation

Copy link
Contributor

Copilot AI commented Aug 20, 2025

This PR adds detailed documentation for adding Python packages to the Roberts Lab Apptainer container used on Klone. The new section addresses a common question from lab members about how to incorporate Python packages into their shared bioinformatics container.

What's Added

The documentation includes four different methods for installing Python packages:

  1. System Python packages (via apt) - For basic packages available in Ubuntu repositories
  2. pip packages - With proper caching and optimization flags
  3. Conda/Mamba environments - Leveraging the existing Miniforge installation
  4. GitHub and custom sources - For packages not in standard repositories

Key Features

  • Best practices section covering version pinning, cache optimization, package grouping, and choosing the right installation method
  • Complete example showing how to add common data science packages (numpy, pandas, matplotlib, seaborn, scikit-learn, biopython, jupyter, etc.)
  • Clear code examples with proper bash syntax for the Apptainer definition file
  • Integration with existing workflow that references the actual container definition file location

The documentation emphasizes that software cannot be installed after container build, reinforcing the importance of updating the definition file and rebuilding the container.

Python Packages Documentation

This provides lab members with actionable guidance for extending the shared bioinformatics container with their specific Python package requirements while maintaining best practices for container optimization and reproducibility.

Fixes #2277.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@sr320 sr320 marked this pull request as ready for review August 20, 2025 22:38
@sr320 sr320 merged commit 1a50787 into master Aug 20, 2025
3 checks passed
@sr320 sr320 deleted the copilot/fix-2277 branch August 20, 2025 22:40
Copilot AI restored the copilot/fix-2277 branch August 20, 2025 22:40
Copilot AI changed the title [WIP] How do I add python packages to our robertslab Apptainer container for use with klone? Add comprehensive Python package installation guide for Apptainer containers Aug 20, 2025
Copilot AI requested a review from sr320 August 20, 2025 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How do I add python packages to our robertslab Apptainer container for use with klone?

2 participants