Skip to content

Installation

drinkingkazu edited this page Jan 16, 2018 · 3 revisions

You can use larcv in 2 ways: either a source build or getting docker/singularity image. We cover both methods in this page.

Building from source

Dependencies

larcv depends on this software called ROOT which is used widely in the field of high energy physics experiment. Here's a list including optional dependencies.

  • ROOT6
  • Python 2 (optional)
  • OpenCV 3 (optional)
  • Numpy (optional) Note that, though it is said "optional", our examples extensively use Python interfaces. So we strongly recommend that. If you got goose bump hearing ROOT, you are most welcome to our team of members wanting to get rid of that dependency (it's totally doable, just need volunteers).

In order to use larcv, you have to source configure.sh script (more later). The optional dependencies listed above are identified by this script automatically through the following mechanisms.

  • ROOT: determined through the ability to run rootcling
  • OpenCV: the presence of OPENCV_INCDIR and OPENCV_LIBDIR environment variables
  • Numpy: being able to import numpy

Steps to build

git clone https://github.com/DeepLearnPhysics/larcv2.git
cd larcv2
source configure.sh
make

That's it. When you want to use the built larcv from a different process, you only need to repeat source configure.sh and no need to re-make.

You can read demo jupyter notebook for these steps in our blog.

How to clean up

It's as simple as rm -r build at larcv repository top directory.

Docker images

You can find larcv2 tagged images on our group's docker hub. To learn how to run a docker image on your machine, read docker documentation. You won't need to learn all steps there to just use our image in a single process. Again feel free to contact us.