O2 on SWAN?


I am looking into using the one of the O2 installations at lxplus in SWAN. Before diving into this, I wanted to ask if anyone has already tried it? The idea would be to have a ROOT or Python session in SWAN with access to O2.


Accessing O2 in ROOT launched in SWAN terminal is possible by running something like:
/cvmfs/alice.cern.ch/bin/alienv enter O2/nightly-20211101-1

However I don’t think it will work inside notebook, as alienv enter (opposite to alienv load) loads new shell and since that point one operates within this shell, which does not allow to execute it as a notebook cell.

I think it is possible and I played with this successfully some time ago. Most likely you will have to set up the O2 environment for SWAN (before launching the instance; maybe in the SWAN config file).
eval `/cvmfs/alice.cern.ch/bin/alienv printenv O2PDPSuite/latest` would actually initialize the environment without having to go to a new shell.

Thanks, Sandro and Sebastian. I’m posting in update in case others are interested in this, too. I managed to set up an O2 environment on swan with the following environment script:

. /cvmfs/alice.cern.ch/etc/login.sh
eval $(alienv printenv VO_ALICE@QualityControl::v1.45.1-1)

# ALICE PyROOT is unhappy about the interference with cppyy from 
# the standard SWAN environment, so we have to disable it:

You can place this somewhere in your CERNbox and load it when you start the swan session. With this environment, I can start a Python notebook, import ROOT and instantiate an O2 class. It’s a bit slow on the first start, but it works.

However, in this setup I was not able to start a notebook with a ROOT/C++ kernel.