Using pre-built singularity container at alice server at GSI

There are two singularity containers prepared by Marian. They can be used on the alice server at GSI. There is one container with a AliRoot installation and one with an O2 installation.
 

* login to GSI from outside

ssh -X lxpool.gsi.de
# you might have to use your GSI user name for the login, i.e. ssh -X username@lxpool.gsi.de

* login to alice server lxir128

ssh -X lxir128.gsi.de

* user defined variables

export RootInteractive=/path/to/your/RootInteractive/directory
# examples:
# export RootInteractive=$HOME/RootInteractive

* clone and install RootInteractive (only once)

git clone https://github.com/miranov25/RootInteractive $RootInteractive

* enter pre-built singularity container and initialize environment

    * AliRoot version
singularity shell --nv -B /cvmfs -B /u/ -B /data.local1/ -B /lustre /data.local1/miranov/JIRA/ATO-500//tensorflow_latest-gpuCUDA
eval $(alienv --no-refresh printenv AliPhysics::latest)
export PYTHONPATH=/usr/local/lib/python3.6/dist-packages:$PYTHONPATH
export PYTHONPATH=$RootInteractive/:$PYTHONPATH
export PATH=/usr/local/bin/:$PATH
    * O2 version
singularity shell --nv -B /cvmfs -B /u/ -B /data.local1/ -B /lustre /data.local1/miranov/JIRA/ATO-500//tensorflow_latest-gpuCUDA_O2test
source /venv/setup2/bin/activate
eval $(alienv --no-refresh printenv O2::latest)
source /venv/setup2/bin/activate
export PYTHONPATH=/usr/local/lib/python3.6/dist-packages:$PYTHONPATH
export PYTHONPATH=$RootInteractive/:$PYTHONPATH
export PATH=/usr/local/bin/:$PATH

* make test:

cd $RootInteractive/RootInteractive/InteractiveDrawing/bokeh/
pytest test_*py
cd $RootInteractive/RootInteractive/tutorial/
jupyter notebook --no-browser --ip=127.0.0.1

* open jupyter notebook in the browser on your local laptop

    * Link to copy to your browser is provided by jupyter notebook shell output:
Or copy and paste one of these URLs:
http://127.0.0.1:8889/?token=1158d925b526dacd9db8b117d71a6750633a8c5f0d482bd6
    * Opening of ssh tunnel required to view the notebook in your local browser on your laptop
        * notebook port is required
            * \<port\> is indicated in the jupyter notebook URL, e.g. -> **8889**
http://127.0.0.1:8889/?token=1158d925b526dacd9db8b117d71a6750633a8c5f0d482bd6
    * open second shell and create ssh tunnel to alice server over user defined \<port\>
ssh -A -t -l username lxpool.gsi.de -L <port>:localhost:<port> ssh -A -t -l username lxir128.gsi.de -L <port>:localhost:<port>
# examples:
# ssh -A -t -l hellbaer lxpool.gsi.de -L 8889:localhost:8889 ssh -A -t -l hellbaer lxir128.gsi.de -L 8889:localhost:8889

 

 

Installing only as virtual environment at lxplus8

* login

ssh -X lxplus8.cern.ch
# you might have to use your CERN user name for the login, i.e. ssh -X username@lxplus8.cern.ch

* global variables

export NOTES=/eos/user/m/mivanov/www/github/alice-tpc-notes

* user defined variables

export EOSuser=/path/to/your/EOS/directory
# examples:
# export EOSuser=/eos/user/e/ehellbar

 

export RootInteractive=/path/to/your/RootInteractive/directory
# examples:
# export RootInteractive=$EOSuser/RootInteractive
# export RootInteractive=/eos/user/m/mivanov/www/github/RootInteractive

 

export venvPrefix=/path/to/your/virtual/python/environments
# examples:
# export venvPrefix=$EOSuser/venv
# export venvPrefix=/eos/user/e/ehellbar/venv
# export venvPrefix=/eos/user/m/mivanov/www/venv

* clone RootInteractive

git clone https://github.com/miranov25/RootInteractive $RootInteractive

* install and use git version - to be done once or if the O2/AliRoot version wil change (on top of version O2sim/v20220220-1)

eval $(/cvmfs/alice.cern.ch/bin/alienv printenv O2sim/v20220220-1)
python3 -m venv ${venvPrefix}/setup2
source ${venvPrefix}/setup2/bin/activate
# python3 -m pip install -r $RootInteractive/requirements.txt
python3 -m pip install -e $RootInteractive

* initialize environment

ssh -X lxplus8.cern.ch
# you might have to use your CERN user name for the login, i.e. ssh -X username@lxplus8.cern.ch
eval $(/cvmfs/alice.cern.ch/bin/alienv printenv O2sim/v20220220-1)
source ${venvPrefix}/setup2/bin/activate
export PYTHONPATH=$RootInteractive/:$PYTHONPATH

* make test:

cd $RootInteractive/RootInteractive/InteractiveDrawing/bokeh/
pytest test_*py
cd $RootInteractive/RootInteractive/tutorial/
jupyter notebook --no-browser --ip=127.0.0.1

* open jupyter notebook in the browser on your local laptop

    * Link to copy to your browser is provided by jupyter notebook shell output:
Or copy and paste one of these URLs:
http://127.0.0.1:8888/?token=48e7e052b37a01608c03f57fb678d05a0c4ca6e9fe5b28bc
 
    * Opening of tunnel required to view the notebook in your local browser on your laptop
        * Remote hostname and port are required
            * \<host\> can be found in the terminal command line on the remote host, e.g. -> **lxplus8s13.cern.ch**:
(setup2) ehellbar@lxplus8s13:/eos/user/e/ehellbar/RootInteractive/RootInteractive/tutorial$
 
            * \<port\> is indicated in the jupyter notebook URL, e.g. -> **8888**
http://127.0.0.1:8888/?token=48e7e052b37a01608c03f57fb678d05a0c4ca6e9fe5b28bc
    * open ssh tunnel in terminal on your local laptop / computer
ssh -N -f -L <port>:localhost:<port> username@<host>
# examples:
# ssh -N -f -L 8888:localhost:8888 ehellbar@lxplus8s13.cern.ch
 
 

 

Installing only as virtual environment on local machine

This should work in principle and was tested on a laptop with ubuntu 20 and a local O2 installation (to be installed locally before). Errors might still occur due to local package or version incompatibilities which can be individual to every machine or use case.
 

* user defined variables

export RootInteractive=/path/to/your/RootInteractive/directory
# examples:
# export RootInteractive=$HOME/RootInteractive

 

export venvPrefix=/path/to/your/virtual/python/environments
# examples:
# export venvPrefix=$HOME/venv

* clone RootInteractive

git clone https://github.com/miranov25/RootInteractive $RootInteractive

* install and setup virtual environment

python3 -m venv ${venvPrefix}/setup2
source ${venvPrefix}/setup2/bin/activate
# python3 -m pip install -r $RootInteractive/requirements.txt
python3 -m pip install -e $RootInteractive

* initialize local O2 installation and virutal environment

eval $(alienv printenv O2::latest)
source ${venvPrefix}/setup2/bin/activate
export PYTHONPATH=$RootInteractive/:$PYTHONPATH

* make test:

cd $RootInteractive/RootInteractive/InteractiveDrawing/bokeh/
pytest test_*py
cd $RootInteractive/RootInteractive/tutorial/
jupyter notebook