Home | News | Documentation | Download

Docker Version Graphics on OSX & PyROOT



Hi, I am trying to test out the Docker images for ROOT on OSX.

First, I would like to use PyROOT, but when I run the provided image from https://hub.docker.com/r/rootproject/root-ubuntu16/ , I do not know how to go to PyROOT. It seems to automatically run the regular ROOT interpreter, and when I quit with .q it quits the whole container. I found a different container on Docker Hub that goes to Bash and lets me start either root or (i)python from which I can import ROOT: https://hub.docker.com/r/skyblue1294/docker_pyku_frame/

If I use the container where I can get to PyROOT, I am unable to get graphical support. I tried the recipe from my first link and from https://apple.stackexchange.com/questions/328082/run-gui-application-in-macos-10-in-docker , but I get the messages “PopupLogo, XOpenDisplay failed” when I first run root, then “Error in TGClient::TGClient: can’t open display “localhost:0.0”, switching to batch mode…” when I try to instantiate a TBrowser.

Any help would be welcome. I want to teach students how to make plots and analyze data using PyROOT. Most of my students use Windows or OSX and many have not ever compiled code, so installing VC/XCode to support the provided binaries is a larger task than learning how to do the plotting!



Maybe, instead of the “docker”, you could try the “Singularity” (which is claimed to work flawlessly with X11).


Hi, the container starts ROOT by default, but if you run it as

$ docker run -it rootproject/root-ubuntu16 bash -l

it will start with bash instead, then you can start python and import ROOT as you would on your local machine.

Also, if you need X, probably xhost + can help if you have problems with forwarding displays.


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