Anaconda
We provide the conda package manager mostly as a legacy toolset for users that have existing conda environments. However for creating new Environments we highly encourage you to try micromamba as a replacement. Micromamba is a C++ executable with a powerful command line interface , which is mostly a drop in replacement for conda. Except for some legacy options and corner cases.
However it has muiltiple benefits that make it the recommended tool on terrabyte compared to conda. First of all it does not need a base environment and therefore does not come with a default Python stack, which might not be needed. Furthermore its c++ solver is optimzed and parallelized utilizing the multiple cores on terrabyte way better when installing or updating larger environments, also downloading and installing packages in parallel. It also does not use the anaconda default channel, which has licence restrictions on its use.
loading anaconda via modules system
On terabyte micromamba is available from the module system and newer versions are provided in the terrabyte dss share. There are multiple versions of micromamba available and
To make it accessible in your shell run:
# consider adding the module use line to your ~/.bashrc to always make terrabyte modules available
module use /dss/dsstbyfs01/pn56su/pn56su-dss-0020/usr/share/modules/files/
module load anaconda
create new micromamba environment
After loading anaconda a new environent called exampleEnv could be created by running
conda create -n exampleEnv -c conda-forge <list of packages>
# alternative to install shared Env outside of your home eg´.g. in DSS Container
conda create -p </dss/.../exampleEnv> -c conda-forge <list of packages>
If the new environment contains the package jupyterlab it can directly be used to start an interactive Notebook via the portal. IN the same way any micromamba environment created via the portal can also be activated from the login node or from inside s SLURM Job.
installing extra packages into existing environment
Additional packages can be installed or updated at a later date via
conda install -n exampleEnv -c conda-forge <list of additional packages>
running commands from a micromamba environment
Contrary to the recommendation of micromamba and conda we do not recommend placing the shell eval script inside your ~/.bashrc or similar as the activation "vodoo" of mamba can adversly interact with the similar approaches of the module system leading to hard to debug and unexpected causalities depending on the order of module loading and micromamba environments. This is especially true when using the portal as here we have observed thses issues. Therefore our suggestion is to not use activate but rather directly run a command or start an new shell via:
conda run -n exampleEnv bash
#or
conda run -n exampleEnv python mycript.py
# or initalize inside your script (least recommended)
eval "$(conda shell hook -s posix)"
conda activate exampleEnv
python myscript.py