Using LHCb Software with docker containers
Introduction
This is a short guide to use the LHCb software stack via docker containers.
Docker is a lightweight virtualization environment with few to none overhead compared to bare metal execution of programs.
More documentation about
docker
can be found here:
https://www.docker.io/
Installation of docker
Instructions to install docker are available on the
docker
website:
http://docs.docker.io/installation
Installation on SLC-6.5
Starting with
SLC-6.5
, docker is available from EPEL, so it is as simple as:
$ sudo yum -y install docker-io
Installation on other Linux distributions
Other Linux distributions are usually more up-to-date than what
SLC
provides.
docker
is thus already available on Ubuntus, Fedoras (>= 19) and others.
Refer to
http://docs.docker.io/installation
for the specifics.
Installation on MacOSX
Installation on OSX is a bit more convoluted: (as of 2014/06) you need to install a thin linux VM in which docker is installed.
All these installations instructions are documented here:
http://docs.docker.io/installation/mac/
and packaged into a single
boot2docker
binary which manages the lifetime of the linux-VM (including downloading it, installing it, configuring it, provisionning it and even ssh-ing into it)
Docker containers for HEP software
A number of containers for HEP has been pre-packaged and made available on the docker index:
https://index.docker.io/
They are defined from this git repository:
https://github.com/hepsw/docks
This repository (as of 2014/11) contains:
-
hepsw/slc5-base
a container with a bare and base installation of SLC-5.x
-
hepsw/slc-base
a container with a bare and base installation of SLC-6.x
-
hepsw/slc-dev
a container with a few programs and libraries on top of hepsw/slc-base
to ease development
-
hepsw/cc7-base
a container with a bare and base installation of CERN Centos-7.x
-
hepsw/cvmfs-base
a container with CernVMFS installed and configured to mount the SFT installation from LCG, and the CernVM-prod one
-
hepsw/cvmfs-atlas
a container providing the ATLAS software via CernVMFS
-
hepsw/cvmfs-cms
a container providing the CMS software via CernVMFS
-
hepsw/cvmfs-lhcb
a container providing the LHCb software stack via CernVMFS
-
hepsw/cvmfs-lsst
a container providing the LSST software stack via CernVMFS
-
hepsw/lhcb-base
a container providing the tools to install LHCb software via RPMs
-
hepsw/lhcb-gaudi
a container providing a Gaudi installation (via the LHCb RPMs)
-
hepsw/lhcb-davinci
a container providing a DaVinci installation (via the LHCb RPMs)
Note that because
hepsw/lhcb-gaudi
and
hepsw/lhcb-davinci
are pretty huge container (resp. 4Gb and 10Gb), they haven't been uploaded on the
docker
index, you will need to build them locally.
Usage
Once
docker
has been properly installed, one can run
e.g. the
hepsw/cvmfs-lhcb:latest
container like so:
$ docker run -h dev --privileged -i -t hepsw/cvmfs-lhcb:latest
This will download the
hepsw/cvmfs-lhcb
container from the index if this hasn't been already done, and then will drop you into a
bash
session with the proper LHCb environment configured (
i.e. LbLogin
).
Then any LHCb software provided by
CernVMFs is available
via SetupProject
.
Each container provided by
hepsw/docks
has more documentation.
See for example:
https://github.com/hepsw/docks/tree/master/cvmfs-lhcb
Caveat emptor
in docker-io 1.0.0-3.el6 there might be an issue running container in privileged mode, which should be fixed in the next release (
https://bugzilla.redhat.com/show_bug.cgi?id=1111233
)
--
SebastienBinet - 05 Jun 2014