Mamba

Da MeteOceanWiki.

To install Miniforge - Mamba

   su
   rm -rf /opt/anaconda3
   wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
   bash Miniforge3-$(uname)-$(uname -m).sh
       when installing change the path to: /opt/miniforge3
   restart terminal
   su
   conda config --set auto_activate_base false
   restart terminal
   su
   conda activate
   conda install -c conda-forge mamba
   mamba install jupyter jupyter-forward


Now lets install the environments:

   METEOCEAN
   mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/meteocean.yml
       RUN WITH: /opt/miniforge3/envs/meteocean/bin/python
   PANGEO
   mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/pangeo.yml
       RUN WITH: /opt/miniforge3/envs/pangeo/bin/python
   MACHINE LEARNING
   mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/machine-learning.yml
       RUN WITH: /opt/miniforge3/envs/machine-learning/bin/python


   exit su --> wavewatch user
   conda activate
   mamba init
   restart terminal
   test everything is working:
       conda activate
       mamba activate ENV


Install OceanParcels package

   su
   cd /opt
   git clone https://github.com/OceanParcels/parcels.git
   cd parcels
   mamba env create -f environment.yml
   mamba activate parcels
   pip install --no-build-isolation --no-deps -e .
        RUN WITH: /opt/miniforge3/envs/parcels/bin/python


Set up jupyter-forward environments. For each ENV:

   su
   conda activate
   mamba activate ENV
   python -m ipykernel install --name ENV --display-name “E”NV


Try tunnelling to another workstation:

   conda activate
   jupyter-forward wavewatch@ned.dicca.unige.it
       if jupyter is not found:
           go to ned and check /bin/bash -lc "which jupyter"
           conda activate
           which python
           copy the path
           open .bashrc
           export PATH=/opt/miniforge3/bin/:$PATH


To update environments:

   su and add the packages to the corresponding ENV.yml (/vhe/nasmetocean/wavewatch/py_libs/)
   su
   conda activate
   mama activate ENV
   mamba env update --file /vhe/nasmetocean/wavewatch/py_libs/ENV.yml --prune