Setup
Requirements for training the GNN are a machine lots of CPUs, GPUs, and RAM. (Improving the training efficiency of the GNN is WIP). You can either use the prebuilt docker containers, or create your own conda environment.
Start by cloning the repo. If you plan to contribute to the repo, you should work from a fork.
git clone ssh://git@gitlab.cern.ch:7999/atlas-flavor-tagging-tools/algorithms/GNNJetTagger.git
cd GNNJetTagger
Prebuilt Image#
Prebuilt docker images are the recommended way to work with the GNN. You can run the prebuilt docker images using singulartiy.
It is recommended to set SINGULARITY_CACHEDIR
in your ~/.bashrc
to make sure images are pulled to a directory with enough free space.
export SINGULARITY_CACHEDIR=<some path>/.singularity/
Next, you can pull the image:
singularity pull --docker-login \
$SINGULARITY_CACHEDIR/gnn_image.simg \
docker://gitlab-registry.cern.ch/atlas-flavor-tagging-tools/algorithms/gnnjettagger:latest
As the repository is internal at the moment, you'll need to enter your CERN credientials when pulling.
Once you've pulled the docker image locally, you can run it with:
singularity exec -ce --nv --bind $PWD \
--env-file ./setup/singularity_envs.sh \
$SINGULARITY_CACHEDIR/gnn_image.simg bash
singularity exec
, use the --bind <path>
argument
Within the image, run the setup script.
python setup.py develop
Running on a system without admistrative access
If you are running on a system without admistrative access, you may encounter
error: can't create or remove files in install directory
--user
flag when running the setup script:
python setup.py develop --user
Conda#
The conda environment requires packages not able to be installed on MacOS.
If you are running on MacOS, you can use the singularity container.
To get started, clone the repo
git clone ssh://git@gitlab.cern.ch:7999/atlas-flavor-tagging-tools/algorithms/GNNJetTagger.git
cd GNNJetTagger
Source the conda setup script (which will actually install mamba)
source ./setup/setup_conda.sh
gnn
environment from the setup/environment.yml
file.
Make sure you active the conda
environent after it is created.
conda activate gnn
Next, install the gnn_tagger
package.
python setup.py develop