# conda and mamba on Rackham@UPPMAX, Dadel@PDC :::danger **Note: the following instructions does not apply for Bianca!** ::: If you experience unexpected problems with the `conda` provided by the module system on Rackham, you can easily install your own and maintain it yourself. :exclamation:**Important: Please, install `miniforge3` or `miniconda3` in your project folder!**:exclamation: Home folders at UPPMAX have 32GB (25GB on Dardel) which is rather limited storage space for most common conda installations. :exclamation:**Important: Please, install `miniforge3` or `miniconda3` in your project folder!**:exclamation: 1. Take some precautions by (re)moving the `.conda` directory and `.condarc` in your home folder if you had ones from previous use. 2. Install `miniforge3` https://github.com/conda-forge/miniforge Download the installation media, run the installation, read and accept the user agreement, and redirect the installation to your project folder, preferably in `/proj/naiss2023-XXX-XX/nobackup/miniforge3`. **Choose to initialize the shell.** ```bash # Navigate to your project folder cd /proj/naiss2023-XXX-XX/nobackup # Download the installation file wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh # Start the interactive installation sh Miniforge3-Linux-x86_64.sh # ... or non-interactive # sh Miniforge3-Linux-x86_64.sh -b -p /proj/naiss2023-XXX-XX/nobackup/miniforge3 ... ``` - Logout and login again to pickup the new `conda` setup, then disable the auto activation of the base environment. Working from the conda base environment might interfere with the software modules provided by the computer center. ```bash (base) conda config --set auto_activate_base false ``` - Logout and login again to get the final setup active. 3. Check that `conda` works ```bash # Check where is conda which conda /proj/naiss2023-XXX-XX/nobackup/miniforge3/condabin/conda # Activate base environment conda activate # Display a health report for your environment. (base) conda doctor Environment Health Report for: /proj/naiss2023-XXX-XX/nobackup/miniforge3 1. Missing Files: ✔ There are no packages with missing files. 2. Altered Files ✔ There are no packages with altered files. ``` 4. Check ```bash # Activate base environment conda activate # Check the output from mamba -V (base) mamba -V mamba 1.5.0 conda 23.7.3 (base) mamba info ``` 5. OPTIONAL: Define `CONDA_ENVS_PATH` if you want to specify different location than the default miniconda3/miniforge3 sub-folder for the new conda environments. ```bash # Add the line bellow in your $HOME/.bashrc export CONDA_ENVS_PATH=/proj/naiss2023-XXX-XX/user/CONDA_ENVS mkdir -p $CONDA_ENVS_PATH ``` ## Advantages and disadvantages of user/project installation ### Advantages: - **Full control over the installation**. - **No specific setup** i.e. one can follow the regular installation instructions provided by developers. - Environments will be installed in subfolder of the installation i.e. in your project folder. - **Faster solutions** for installations - conda does not have to search through all available indexes but only the one you provide. - You can install in the `(base)` environment (although not a good practice). ### Disadvantages - **:point_right: You need to maintain the installation** - setup, cleaning cache, update, etc. - Not applicable solution for isolated clusters like Bianca. ## Beyond conda and mamba - If you want to install `anaconda`, just follow the same instructions. `anacaonda` is selection of packages and could be installed with `conda` with `conda create -n anaconda anaconda` - Tired of conda - try [pixi](https://pixi.sh/latest/) - faster, python independent package manager and more utilizing the conda packaging ecosystem. - [7 Reasons to Switch from Conda to Pixi](https://prefix.dev/blog/pixi_a_fast_conda_alternative) - [What is the difference with `conda`, `mamba`, `poetry`, `pip`](https://pixi.sh/latest/FAQ/#what-is-the-difference-with-conda-mamba-poetry-pip) - > just my personal opinion 🤏🧂: I hope this or similar project becomes more popular or standard... ## Contacts: - [Pavlin Mitev](https://katalog.uu.se/profile/?id=N3-1425) - [UPPMAX](https://www.uppmax.uu.se/) - [AE@UPPMAX - related documentation](/8sqXISVRRquPDSw9o1DizQ) ![](https://live.webb.uu.se/digitalAssets/207/c_207717-l_3-k_bg-city.png) ###### tags: `UPPMAX`, `PDC`