Getting docker
Docker is a software suite to run software in a platform independent way akin to virtual machines.
Learn how to download and install it on your system (admin rights required): https://www.docker.com/get-started
CbmRoot docker environment
There are following containers in this package build upon each other in the following order:
- fairsoft
- fairroot
- cbmroot
- jupyter notebook with cbmroot (cbmroot-notebook)
- jupyterhub with cbmroot-notebook enabled (cbmroot-jupyterhub)
To run any of these containers, you need to initialize them first, e.g. run the following commands:
docker-compose up -d cbmroot
The pre-build container images will then be downloaded. The containers will run and keep any files you create inside it until you won't remove them from your system with:
docker-compose down -v
The software is installed in /opt
within containers, e.g.:
/opt/fairsoft
/opt/fairroot
/opt/cbmroot
To enter the container environment, run
docker-compose exec cbmroot bash
Running interactive ROOT analysis in JupyterLab
Run the following command in your terminal
docker-compose up cbmroot-jupyterhub
You can navigate to http://localhost:8000 in your browser.
Authorize yourself with user dummy
and password dummy
.
CbmRoot development environment
If you are a CbmRoot power-user or a developer you might want to check out the cbmroot-dev
container, also known as cbmdock
.
When creating the container for the first time, run:
export UID
docker-compose up cbmroot-dev
and wait until the development version of CbmRoot will be compiled.
You can change GIT_REPO
and GIT_TAG
variables in the docker-compose.yml
to compile the code from destination and git tag (or commit) of your choise, respectively.
The files will be shared with the container and your computer (located in code/cbmroot
), so you can edit them conveniently with your favorite code editor.
You either can enter the container as usual or ssh into it by issuing the command:
ssh -Y cbmdock@localhost -p 2222
Troubleshooting
Visualization
If you have no visualization you need to install the x11 on your host machine.
In macOS it is XQuartz. Run it, go to preferences -> security and enable connections from network clients.
Then from your terminal execute:
xhost + localhost
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
In linux try to export the environment variable before running visualisations:
export LIBGL_ALWAYS_INDIRECT=1
More info can be found here https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFireworksHowToFix#OpenGL_and_X11_problems
Image is being built rather than downloaded:
If this happens to any of non-development containers, run for example:
docker-compose pull cbmroot
Installing docker in Linux
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Read more at https://www.docker.com/get-started