Skip to content

Setup and Installation

Raj Handique edited this page Jun 25, 2025 · 3 revisions

Requirements for the pipeline setup

The CMS-OpenData-Pipeline has certain requirements:

  1. Docker should be up and running in the local machine. Alternatively, CMS-OpenData Virtual Machine works as well. (It is recommended not to use the VM as it is painfully slow)
  2. CMS Offline Software Framework - CMSSW should be set up in the docker container.
  3. MiniConda or AnaConda should be installed in your local system.
  4. ROOT(6.20 or higher) must be installed in the local machine.
  5. Linux-based systems are preferred, Windows systems are not recommended as docker has compatibility issues with Windows.

Docker is a container tool that provides the user with a snapshot of a specific CMSSW version to work on your local machine without the requirement for lxplus or a CERN account. For Run 1, the docker container containing the CMSSW_5_3_32 needs to be installed and for Run 2, the docker container containing the CMSSW_7_6_7 needs to be installed.

This guide shall discuss how to set up the docker container for CMSSW_5_3_32 and CMSSW_7_6_7. For installing the Docker engine in your local machine, a more thorough guide can be found in the manual or visit the Docker website.

Setting up the Docker container: CMSSW_5_3_32

The CMSSW_5_3_32 container image is available on DockerHub. The installation process for the software environment is discussed below:

  1. Fetch the docker container on the local machine using:
docker pull cmsopendata/cmssw_5_3_32-slc6_amd64_gcc472
  1. Now let's mount a common file area for sharing files between the docker container and the local machine:
export workpath=$PWD
mkdir cmsopendata
chmod -R 777 cmsopendata
  1. Then to run the docker container using the following command:
docker run -it --name CMSSW_5_3_32 -P -p 5902:5902 -p 6080:6080 -v $workpath/cmsopendata:/code cmsopendata/cmssw_5_3_32-slc6_amd64_gcc472:latest /bin/bash
  1. The name given to the container is CMSSW_5_3_32. After the fetching is done one shall be able to access the CMS offline software environment from here.

Note: Once one uses the exit command or closes the terminal mistakenly (which we all do a lot of times), the Docker container needs to be started again.

  1. To start the Docker container again:
docker start -i CMSSW_5_3_32

Note: To start the docker container, one is compelled to type this command in their terminal over and over again. So, it is better if one makes a terminal shortcut command or an alias in the .bashrc (or your shell's read-command file) file. Locate the .bashrc file in the /home/ directory and add the following lines to the file:

alias c532="docker start -i CMSSW_5_3_32"

Now, one just has to use the command c532 to start the docker container.

Setting up the Docker container: CMSSW_7_6_7

The CMSSW_7_6_7 container image is available on DockerHub. The installation process for the software environment is discussed below:

  1. Fetch the docker container on the local machine using:
docker pull cmsopendata/cmssw_7_6_7-slc6_amd64_gcc493
  1. Now let's mount a common file area for sharing files between the docker container and the local machine:
export workpath=$PWD
mkdir cmsopendata
chmod -R 777 cmsopendata
  1. Then to run the docker container using the following command:
docker run -it --name CMSSW_7_6_7 -P -p 5901:5901 -p 6081:6081 -v $workpath/cmsopendata:/code cmsopendata/cmssw_7_6_7-slc6_amd64_gcc493:latest /bin/bash
  1. The name given to the container is CMSSW_7_6_7. After the fetching is done one shall be able to access the CMS offline software environment from here.

Note: Once one uses the exit command or closes the terminal mistakenly (which we all do a lot of times), the Docker container needs to be started again.

  1. To start the Docker container again:
docker start -i CMSSW_7_6_7

Note: To start the docker container, one is compelled to type this command in their terminal over and over again. So, it is better if one makes a terminal shortcut command or an alias in the .bashrc (or your shell's read-command file) file. Locate the .bashrc file in the /home/ directory and add the following lines to the file:

alias c767="docker start -i CMSSW_7_6_7"

Now, one just has to use the command c767 to start the docker container.