Mamba: differenze tra le versioni
Da MeteOceanWiki.
| (8 revisioni intermedie di un utente non mostrate) | |||
| Riga 6: | Riga 6: | ||
bash Miniforge3-$(uname)-$(uname -m).sh | bash Miniforge3-$(uname)-$(uname -m).sh | ||
when installing change the path to: /opt/miniforge3 | when installing change the path to: /opt/miniforge3 | ||
| + | when asked if you want to add conda init say: YES | ||
restart terminal | restart terminal | ||
su | su | ||
| Riga 13: | Riga 14: | ||
conda activate | conda activate | ||
conda install -c conda-forge mamba | conda install -c conda-forge mamba | ||
| − | mamba install jupyter jupyter-forward | + | mamba install jupyter jupyter-forward nb_conda_kernels jupyter-server-proxy dask-labextension |
Now lets install the environments: | Now lets install the environments: | ||
| − | + | METEOCEAN | |
mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/meteocean.yml | mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/meteocean.yml | ||
RUN WITH: /opt/miniforge3/envs/meteocean/bin/python | RUN WITH: /opt/miniforge3/envs/meteocean/bin/python | ||
| + | PANGEO | ||
mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/pangeo.yml | mamba env create -f /vhe/nasmetocean/wavewatch/py_libs/pangeo.yml | ||
RUN WITH: /opt/miniforge3/envs/pangeo/bin/python | 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 | ||
| + | - Check that CUDA is installed: | ||
| + | - nvcc --version | ||
| + | - If it says that nvcc doesn’t exists check under /usr/local/ if you have a cuda folder. If not CUDA is not installed. Follow the following guide. | ||
| + | [1. Introduction — Installation Guide for Linux 12.4 documentation](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) | ||
| + | - [CUDA Toolkit 12.1 Downloads](https://developer.nvidia.com/cuda-downloads) | ||
| + | - wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run | ||
| + | - sh cuda_12.4.0_550.54.14_linux.run | ||
| + | |||
| + | mamba activate machine-learning | ||
| + | pip install falkon -f https://falkon.dibris.unige.it/torch-2.2.0_cu121.html | ||
exit su --> wavewatch user | exit su --> wavewatch user | ||
conda activate | conda activate | ||
| + | if error because conda does not exist /opt/miniforge/bin/conda init | ||
| + | restart terminal | ||
| + | conda config --set auto_activate_base false | ||
mamba init | mamba init | ||
restart terminal | restart terminal | ||
| Riga 33: | Riga 51: | ||
conda activate | conda activate | ||
mamba activate ENV | 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 | ||
| Riga 40: | Riga 70: | ||
conda activate | conda activate | ||
mamba activate ENV | mamba activate ENV | ||
| − | python -m ipykernel install --name ENV --display-name | + | python -m ipykernel install --name ENV --display-name ENV |
Versione attuale delle 13:51, 12 giu 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 when asked if you want to add conda init say: YES 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 nb_conda_kernels jupyter-server-proxy dask-labextension
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
- Check that CUDA is installed:
- nvcc --version
- If it says that nvcc doesn’t exists check under /usr/local/ if you have a cuda folder. If not CUDA is not installed. Follow the following guide.
[1. Introduction — Installation Guide for Linux 12.4 documentation](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)
- [CUDA Toolkit 12.1 Downloads](https://developer.nvidia.com/cuda-downloads)
- wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run - sh cuda_12.4.0_550.54.14_linux.run
mamba activate machine-learning pip install falkon -f https://falkon.dibris.unige.it/torch-2.2.0_cu121.html
exit su --> wavewatch user
conda activate
if error because conda does not exist /opt/miniforge/bin/conda init
restart terminal
conda config --set auto_activate_base false
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 ENV
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