All materials (c) 2020-2023 by CSC – IT Center for Science Ltd. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 Unported License, http://creativecommons.org/licenses/by-sa/4.0/
Tool for installing software in containers with normal user rights
Developed mainly to replace direct Conda installations
Can also be used for other installations.
In Puhti and Mahti:
module load tykkyIn Lumi:
module load LUMI/22.08
module load lumi-container-wrapper/CSC_CONTAINERinside the container at run time/CSC_CONTAINER/miniconda/envs/env1/users, /projappl, /scratch) and the SquashFS image$PATH when installing
module purgeunset PYTHONPATH if necessaryCreate by hand
Sometimes provided by developers
Can be retrieved form existing environment
conda env export -n <target_env_name> > env.ymlchannels:
- conda-forge
dependencies:
- python=3.8.8
- scipy
- nglview
conda-containerize new --prefix <install_dir> env.yml
--mamba to use Mamba instead of Conda
--requirement/-r <file> requirement file for pipconda-containerize update <existing installation> --post-install <file>
Where the post-install file contains any additional installation commands
conda install -y numpy
pip install requests
cd /some/folder
python setup.py install
wrap-container -w /path/inside/container <container> --prefix <install_dir>
-w is the path (or comma separated list of paths) where the executables to be wrapped are. Needs to an absolute path inside the container.Add installation bin directory to $PATH
export PATH=/projappl/project_12345/someapp/bin:$PATHTykky installation bin directory often contains common programs (e.g. as python)
$PATH when actually usingIf running out of memory when installing, try installing in an interactive session, e.g.
sinteractive --account <project> --time 1:00:00 --mem 12000 --tmp 15Most common reason for non memory related errors is problems with the environment YAML file syntax
For Conda environment related errors follow normal procedure (a gallon of coffee and a spare keyboard to bang your head on recommended)