Setting up a Docker development environment

Using Docker

  • Download and prepare a Docker

The following setup is based on the Hackathon setup here.

Prerequisites

  • Docker: you should be able to run Docker containers. On MacOS you should have the latest version of Docker, which finally has built in virtualization. Be sure to use the most recent version of upgrade-hackathon-setup, as well, as several Mac related issues were fixed, and Mac is now fully supported with no (known) caveats. Also ensure that you're logged in on Docker by running the command docker login, supplying your Docker ID (username, not email address!) and password.
  • Fuse: You should have a very recent version of Fuse (or OSXFuse on MacOS)
  • CVMFS: you should have access to /cvmfs/lhcb.cern.ch. On a Mac you will need OSXFuse and CernVM-FS.

Mounting CVMFS manuallyClick to expand

Quick start

To get started, get the tools with:

local:~ $ git clone ssh://git@gitlab.cern.ch:7999/lhcb/upgrade-hackathon-setup.git hackathon

Using your ssh key inside the containerClick to expand

Then from the hackathon directory just created invoke:

local:hackathon $ ./lb-docker-run -c x86_64-centos7-gcc7-opt

which will pull the latest image of the CentOS7 Docker image we use to build our software and start an interactive shell in the special directory /workspace, mapped to the local hackathon directory.

Note about the options of the `lb-docker-run` commandClick to expand

Building the whole stack the first time may take a lot of time, so you can optionally get a pre-built image with:

local:hackathon $ make pull-build

At this point you can build the software stack with (will build automatically in parallel):

local:hackathon $ make

If you didn't pull the pre-built image, this command will checkout the code and build from scratch.

Using CVMFSClick to expand

Building a project

This is how you would run MiniBrunel:

local:~ $ . /cvmfs/lhcb.cern.ch/lib/lhcb/LBSCRIPTS/dev/InstallArea/scripts/LbLogin.sh -c x86_64-slc6-gcc49-opt
local:~ $ lb-dev --nightly-cvmfs --nightly lhcb-future 282 Brunel/future
local:~ $ cd BrunelDev_future
local:BrunelDev_future $ git lb-use -q Brunel
local:BrunelDev_future $ git lb-use -q Rec
local:BrunelDev_future $ git lb-checkout Brunel/future Rec/Brunel
local:BrunelDev_future $ make
local:BrunelDev_future $ ./run gaudirun.py Rec/Brunel/options/MiniBrunel.py

results matching ""

    No results matching ""