-
Notifications
You must be signed in to change notification settings - Fork 1
Setup and Installation
The CMS-OpenData-Pipeline has certain requirements:
- 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)
- CMS Offline Software Framework - CMSSW should be set up in the docker container.
- MiniConda or AnaConda should be installed in your local system.
- ROOT(6.20 or higher) must be installed in the local machine.
- 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.
The CMSSW_5_3_32 container image is available on DockerHub. The installation process for the software environment is discussed below:
- Fetch the docker container on the local machine using:
docker pull cmsopendata/cmssw_5_3_32-slc6_amd64_gcc472- 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- 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- 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
exitcommand or closes the terminal mistakenly (which we all do a lot of times), the Docker container needs to be started again.
- To start the Docker container again:
docker start -i CMSSW_5_3_32Note: 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.bashrcfile 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
c532to start the docker container.
The CMSSW_7_6_7 container image is available on DockerHub. The installation process for the software environment is discussed below:
- Fetch the docker container on the local machine using:
docker pull cmsopendata/cmssw_7_6_7-slc6_amd64_gcc493- 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- 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- 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
exitcommand or closes the terminal mistakenly (which we all do a lot of times), the Docker container needs to be started again.
- To start the Docker container again:
docker start -i CMSSW_7_6_7Note: 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.bashrcfile 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
c767to start the docker container.