Mamba: differenze tra le versioni

Da MeteOceanWiki.
Riga 28: Riga 28:
 
     MACHINE LEARNING
 
     MACHINE LEARNING
 
     mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/machine-learning.yml
 
     mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/machine-learning.yml
         RUN WITH: /opt/miniforge3/envs/machine_learning/bin/python
+
         RUN WITH: /opt/miniforge3/envs/machine-learning/bin/python
  
  

Versione delle 12:09, 22 feb 2024

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


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