in docker container

I’m running the container from docker://rootproject/root:6.26.10-fedora36,
but I want to use pyroot in this container. I can’t find the file anywhere. I read this forum thread, but none of the locations discussed contained the file. I don’t know where the build directory is. I can only find the root executable /usr/bin/root .

ROOT Version: v6-26-10
Platform: Fedora
Compiler: Not Provided

The $ROOTSYS/bin folder should contain:

bin % ls
afterimage-config	proofserv		rootbrowse		rootls			rootreadspeed		setxrd.csh
afterimage-libs		proofserv.exe		rootcint		rootmkdir		rootrm
genreflex		rmkdepend		rootcling		rootmv			roots			thisroot.csh
hadd			root			rootcp			rootn.exe		roots.exe
hist2workspace		root-config		rootdrawtree		rootnb.exe		rootslimtree
prepareHistFactory	root.exe		rooteventselector	rootprint		rootssh			xpdtest sits there too. That’s not what you see on your machine ?

I do not have the $ROOTSYS variable set. Or rather, it is the same as on my computer, so it points to a different root, not the one in the container. But I cannot find a directory that contains those things.
I am using singularity for the container rather than docker if that is important

Yes ROOTSYS is defined when you run I just wanted to mean ROOT being the “place where root is installed”. Are you sure ROOT is installed on this machine? what do you get when you run /usr/bin/root ?

ROOT is definitely installed. I can run it and it is version 6.26.10 which is different from the installation outside the container. I am new to containers, so I just don’t know where to find the “installation directory” for ROOT when I’m in the container. What is the default path for this directory with a new container from the rootproject dockerhub?

The ROOT binaries (including should be in the same place where the ROOT executable is. You can get that directory by typing which root.

which root gives /usr/bin/root. The directory /usr/bin does not contain It contains other executables like rootls and rootssh, but is not a ROOT “build directory” that I would have if I installed ROOT myself.

Ah ok. If you really need that file it is present here: root/config at master · root-project/root · GitHub

OK, I think I’ve figured it out. If I run the shell using sudo, I can import ROOT in python because it has the appropriate ROOT stuff in the python site-packages/. It wasn’t working when I ran the shell without sudo because it wasn’t setting $PYTHONPATH (discussed here). I can just set $PYTHONPATH directly and don’t need to source (which I’m fairly certain does not exit in my container).

It would be nice to have a to source to easily make use of ROOT if I set up different python environments, but I guess I can always just add a link to /usr/lib64/python__/site-packages/ROOT in the site-packages folder for my other environment.

TL;DR: There was really never a problem. I thought there was because I was searching for (which I couldn’t find because it isn’t there), but what I fundamentally needed was ROOT/ which was always there in site-packages/ ; I was just not looking for it!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.