Custom Bundle Overlaysο
This guide focuses on building bundle overlays using custom build scripts. The build scripts aim to let you modify the conda packages.
If you donβt need modifications, directly use Conda YAML file:
condatainer create -p <prefix> -f <conda_yaml>
Warning
If you have packages not available via Conda, please directly build a os overlay instead. See the Read-only R Package Environment.
See Build Scripts Manual for more details about writing build scripts.
Step-by-Step Guide: Custom Build Scriptο
In the following steps, we will:
Use conda to install
pySCENIC.Fix the issue 475 by editing
pySCENICfiles.
Pause a Moment: Why Not Just Build an OS Overlay or Apptainer Image?ο
CondaTainer is good for managing writable environments during development. If you have already developed a pipeline and fixed package versions, you should directly build a read-only Apptainer image or OS overlay with all dependencies included.
If target app already has docker or singularity images, consider using them as base instead. See Custom System Overlays for details.
1. Create a Custom Build Scriptο
pyscenic.sh
#!/bin/bash
# Available variables:
# - target_dir: /cnt/name (set by condatainer)
# - tmp_dir: tmp directory (set by condatainer)
micromamba create -y \
--root-prefix $tmp_dir \
--prefix $target_dir \
-c conda-forge -c bioconda \
--quiet \
python=3.10 pyscenic=0.12.1 setuptools=79
# Fix issue 475:
sed -i 's/auc_thresholds\.iteritems()/auc_thresholds.items()/g' \
$target_dir/lib/python3.10/site-packages/pyscenic/cli/utils.py
2. Create the Read-only Environmentο
condatainer create -f pyscenic.sh -p pyscenic
3. Use the Environmentο
condatainer exec -o pyscenic.sqf \
pyscenic -h