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: object

A Conda installation in a container sandbox.

Bootstraps a miniforge based Conda installation in a container sandbox.

Parameters:
sandboxSingularitySandbox

The sandbox in which Conda should be installed.

prefixstr

The Conda prefix to use for the Conda install.

Attributes:
sandboxSingularitySandbox

The sandbox in which Conda is installed.

prefixstr

The Conda prefix used for the Conda install.

Methods

add_environment(*, path, name)

Add an exported Conda environment to the Conda install.

cleanup_unused_files()

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:
pathos.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.

cleanup_unused_files()#

Remove all unused Conda files.

Equivalent to calling “conda clean -a”.