condatainer

command module
v1.1.2-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: BSD-3-Clause Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README ΒΆ

CondaTainer

CondaTainer Logo

Read the Docs Go Reference GitHub Release

CondaTainer is an HPC-oriented CLI that streamlines environment and data management by utilizing Apptainer, SquashFS, OverlayFS, and Micromamba.

  • Inode Saver: Packing 30k+ Conda files into a single image to satisfy inode quotas.
  • Web-App Ready: Out-of-the-box support for running RStudio, VS Code, Jupyter and more on HPC.
  • Environment Isolation: Supports read-only (.sqf) for production and writable (.img) for development.
  • Scheduler Integration: Native compatibility with Slurm, PBS, LSF, and HTCondor for batch job submission.

[!NOTE] Slurm is the primary scheduler supported and tested. Others are experimental, please report any issues you encounter.

πŸ› οΈ Installation

curl -fsSL https://get-condatainer.justype.net | bash

You will be prompted to confirm the installation path (defaulting to $SCRATCH/condatainer/ or $HOME/condatainer/). The script will also edit shell config.

βš™οΈ Configuration

After installation, run the following command to create a default configuration file:

source ~/.bashrc # or source your shell config
module load apptainer # if apptainer is provided as a module
condatainer config init

This step will let CondaTainer save the apptainer path for future use.

πŸ‘€ Quick Look

condatainer avail # List available recipes
condatainer list  # List installed

# Install and Run
condatainer create samtools/1.16
condatainer exec -o samtools/1.16 samtools --version

# Create a read-only project overlay from a YAML file
condatainer create -f environment.yml -p my_analysis
condatainer exec -o my_analysis.sqf bash

# Automatically install the dependencies
condatainer check analysis.sh -a

# Print helpful info when running with overlays
condatainer exec -o grch38/cellranger/2024-A bash
# [CondaTainer] Overlay envs:
#   CELLRANGER_REF_DIR: cellranger reference dir
#   GENOME_FASTA      : genome fasta
#   ANNOTATION_GTF_GZ : 10X modified gtf
#   STAR_INDEX_DIR    : STAR index dir

πŸ“¦ Writable Overlay

CondaTainer allows users to create writable workspace overlays for development purposes.

# Create a writable overlay of size 5G
condatainer overlay create -s 5G env.img
# Resize an existing overlay to 10G
condatainer overlay resize -s 10G env.img
# Change the file UID/GID to current user in an overlay
# This is useful when the overlay was created by another user
condatainer overlay chown env.img

# Launch a bash shell inside the writable overlay
condatainer exec -w -o env.img bash
condatainer e # shortcut for above

# Run in read-only mode
condatainer exec -o env.img bash

CondaTainer will set PATH and other environment variables for you automatically.

When in writable mode, you can install packages using mm-* Micromamba wrappers. (conda-forge and bioconda only)

mm-install r-base=4.4 r-tidyverse
mm-pin r-base
mm-pin -r r-base # unpin
mm-list
mm-search r-ggplot2
mm-remove r-tidyverse
mm-update
mm-clean -a
mm-export

πŸš€ Automation

CondaTainer supports inline dependency declaration and automatic job submission. Define requirements with #DEP: tags and scheduler directives (#SBATCH, #PBS, or #BSUB). HTCondor uses native .sub submit files.

Example Script (analysis.sh):

#!/bin/bash
#SBATCH --time=4:00:00
#SBATCH --cpus-per-task=8
#SBATCH --mem=30G
#DEP:salmon/1.10.2
#DEP:grch38/salmon/1.10.2/gencode47

salmon quant \
  -i $SALMON_INDEX_DIR \
  -p $SLURM_CPUS_PER_TASK \
  -l A -r reads.fq -o quants/

Auto install dependencies and submit the job with:

condatainer run analysis.sh -a

If no scheduler directives are found or job submission is disabled, the script will run immediately in the current shell.

Acknowledgements

This project used computational resources provided by

McMaster University Logo Β Β Β  Digital Research Alliance of Canada Logo

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
scheduler
Package scheduler provides a unified interface for HPC job schedulers
Package scheduler provides a unified interface for HPC job schedulers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL