# 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 installation and maintain it yourself. :exclamation:**Important: Please, install `miniforge3` 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` 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`. 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/miniconda3/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/miniconda3 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 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 use 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 - You need to maintain the installation - setup, cleaning cache, etc. - Not applicable solution for isolated clusters like Bianca ## 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`