Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# find a specific installation of cineca-ai module
module load spack
spack find <CINECA-AI PACKAGE>
e.g. spack find py-torch

# use the specific installation of cineca-ai module loading it via spack
spack loads <CINECA-AI PACKAGE>
e.g. spack loads py-torch

For checking the loaded packages and eventually unload them
spack find --loaded
spack unload --all

# use the specific installation of cineca-ai module to install additional packages via spack 
spack install <YOUR PACKAGE> ^<CINECA-AI PACKAGE>  
e.g. spack  install <YOUR PACKAGE> ^py-torch 

3. Notebook use in a Python environment

To open a notebook in a Python environment, it is neccessary to:

...

load the deeplrn profile: 

Code Block
module load profile/deeplrn

load cineca-ai:

Code Block
 module load cineca-ai

create your environment: 

Code Block
python -m venv <name> --system-site-packages

activate your environment: 

Code Block
source <name>/bin/activate

...

Code Block
export PYTHONPATH=<path>/<name>/lib/python3.10/site-packages: $PYTHONPATH

...

create an SSH tunnel and start the notebook in your browser

Code Block
 ssh -L 9999:localhost:9999 USER@login01-ext.leonardo.cineca.it -N

Step 1. Launch jupyter notebook

 On your REMOTE machine run the following command to open a jupyter notebook:

Code Block
 jupyter notebook --port=9999 --no-browser

NB: once you have also completed step 2, open a browser on your local machine and copy the URL in the address bar.

 

Step 2. Open the SSH tunnel

 You are on the remote machine (or in dry run mode), so follow these instructions

 On your LOCAL machine open an SSH tunnel using the following command:

Code Block
  ssh -L 9999:localhost:9999 <user>@login0<login_number>-ext.leonardo.cineca.it ssh -L 9999:localhost:9999 <compute_node> -N