cotainr.pack module#
cotainr - a user space Apptainer/Singularity container builder.
Copyright DeiC, deic.dk Licensed under the European Union Public License (EUPL) 1.2 - see the LICENSE file for details.
This module implements packing of software into the container.
Classes#
- CondaInstall
A Conda installation in a container sandbox.
API reference#
- class cotainr.pack.CondaInstall(*, sandbox, prefix='/opt/conda')#
Bases:
objectA Conda installation in a container sandbox.
Bootstraps a miniforge based Conda installation in a container sandbox.
- Parameters:
- sandbox
SingularitySandbox The sandbox in which Conda should be installed.
- prefixstr
The Conda prefix to use for the Conda install.
- sandbox
- Attributes:
- sandbox
SingularitySandbox The sandbox in which Conda is installed.
- prefixstr
The Conda prefix used for the Conda install.
- sandbox
Methods
add_environment(*, path, name)Add an exported Conda environment to the Conda install.
Remove all unused Conda files.
- add_environment(*, path, name)#
Add an exported Conda environment to the Conda install.
Equivalent to calling “conda env create -f path -n name”.
- Parameters:
- path
os.PathLike The path to the exported env.yml file describing the Conda environment to install.
- namestr
The name to use for the installed Conda environment.
- path
- cleanup_unused_files()#
Remove all unused Conda files.
Equivalent to calling “conda clean -a”.