Create a CMSSW sandbox

The following tutorial shows how to pack a specific CMSSW framework releases to use it on your jobs.

Quick Start

To create a sandbox file from a CMSSW release directory, you can use the cmssw-sandbox tool. For example:

Optionally, you can specify a directory to write the sandbox file with -o. Sandboxes for the same CMSSW release will not be overwritten by default, so you can use  -U when creating to update your sandbox file.

The following wrapper shows how to use the sandbox. You can transfer cmssw_setup.sh with your job to use the the sandbox on the worker node.


Introduction

The analysis code a user needs to run often depends on the CMSSW framework. This usually requires:

  • Setting up a specific CMSSW release
  • Getting and compiling some user-specific code

The second step can take some time and not always be that straightforward. Rather than having every single job systematically doing this, you can do it interactively once and package it in a file that gets transferred to the worker node instead.

Using the CMSSW Sandbox Creator tool

This tool allows you to easily create a sandbox file from a CMSSW directory, it  takes such directory as the input and you can specify a directory to put the sandbox, the sandbox name will have the version release and a hash.


Use-case example

Let's assume we want to setup CMSSW 7.2.3 and then checkout some code from git:

 Now, we can simply run the tool:

The above command will copy the directories needed in the CMSSW framework area (bin, cfipython, config, lib, module, python), plus all data, interface, python subdirectories in $CMSSW_BASE/src recursively. To copy all content in src, you can type instead:


or to include some additional, but not all subdirectories in $CMSSW_BASE/src, use option -i. For example, if we want to include src and test subdirectories in $CMSSW_BASE/src recursively

To use the sandbox, you will need a wrapper, available in /etc/ciconnect/templates/cmssw_setup.sh