Introduction to Docker

Last update: 16 Aug 2024 [History] [Edit]

Unfortunately to give an in depth Docker tutorial, it would require the installation of Docker on your laptops or local machines.

If you get time to do this or want to try this in your spare time the installation instructions are given below.

To install Docker Community Edition on your Linux, Mac, or Windows machine follow the instructions in the Docker docs.

Using an AnalysisBase/AthAnalysis image

Once you have Docker installed, you should be able to pull an AnalysisBase or AthAnalysis from Docker hub, what is available can be found here.

For example, try pulling our AnalysisBase release

docker pull atlas/analysisbase:21.2.189

This may take some time to download, this will be quite a large file. However, if you are able to get this downloaded, you are able to run

docker run -v /your/analysis/code:/your/analysis/code -it atlas/analysisbase:21.2.189

This will start up the docker container. Note, the -v option here will mount a directory from your machine to the container. Without this, any changes or updates you make when you have started up the container will not be saved when you terminate.

Finally, to set up the environment inside the image for building/running your code, you need to source the /release_setup.sh script. And there you have an instance of AnalysisBase,21.2.189 running and useable on your local machine.

Something to try

  • Download the data file we have been using this week to your local machine
  • Clone your MyxAODAnalysis project to your laptop
  • Run your code you have been developing this week within the Docker container

More resources

It is worth mentioning that really good material has been developed, the ‘Introduction to Docker’ tutorial has been used in the past. I will link this HERE.

The tutorial goes into quite deep detail and shows what really can be done with Docker.