Singularity container with FLUKA and Flair

Dear FLUKA community

The clusters at our institute run Singularity ( Singularity is compatible with Docker containers, but since FLUKA for Docker ( uses the INFN version of FLUKA, I wrote a simple definition file to build a Singularity container with CERN’s FLUKA and Flair. Maybe some of you will find this useful.

To get things running, just do the following (assuming you are running linux with root privileges):

  1. Install Singularity (see
  2. Navigate to some directory where you want your container to be placed. Let’s call this path /your/singularity/dir/
  3. Download the fluka-2011-3.0.Linux-gfor7_amd64.deb file of FLUKA from and move the file to /your/singularity/dir/.
  4. Place also the definition file Singularity.inp (1.1 KB) in /your/singularity/dir/ and change its name to Singularity.def (it is a text file, but the FLUKA forum has some restrictions on the file extension for uploaded files)
  5. Open a terminal and Inside /your/singularity/dir/ run the following command (as root): sudo singularity build f4s.simg Singularity.def. This will take a little while (and ask you for your region settings) and produce an Ubuntu 18.04 based container file called ‘f4s.simg’.
  6. Now use FLUKA and Flair in your container! See To access the container, run singularity shell f4s.simg. Note that Singularity automatically binds your home in the container’s home. Also the user is the same. If you want to be root inside your container, e.g. to install additional packages, run sudo singularity shell --writable f4s.simg.

Of course, this is just a very quick and dirty build and I did not test this very thoroughly. E.g. there are some GTK error messages related to gnuplot when plotting things in Flair (but the plots are produced). So any further testing and improvements from your side are more than welcome!


Hello @lorenzo.mercolli,

thanks a lot for sharing! I’m sure that this will be very helpful for a lot of people who have to opt for containerized solutions.

Best regards