Agent Based Modeling Workflows with Docker for Collaboration and Reuse

Agent based models and their associated analyses often have many software dependencies. This video provides an on overview on using Docker to create isolated distributable bundles of software to handle dependency management - making development and sharing of agent based models simpler.

Group Members
Calvin Pritchard, Arizona State University, USA
Allen Lee, Arizona State University, USA
Andres Baeza, Arizona State University, USA [worked on model and analysis]
Felix John, Center for Environmental Research (UFZ), Germany [worked on model and analysis]

Speakers
Calvin Pritchard

Metadata

Repository: https://github.com/comses/wolf-sheep

Docker Notes:

Image Sources:

There are many alternatives to Docker for creating isolated packaging environments for software on Linux (which I didn’t discuss at all in the video).

You could use only your programming language’s package manager to manage dependencies. This works great if your packages do not depend on system package dependencies. The wolf sheep R analysis, however, depends on cURL header files being installed on the system for the RCurl package to install. This means using the programming language’s package manager doesn’t contain all the dependencies for your software. Someone could try to setup your project on another machine with a different version of cURL headers and encounter errors.

Functional package managers like Nix (also available for Mac OS X) and Guix offer a more complete solution than programming language package managers. They include all dependencies and allow multiple versions of a package to exist peacefully on your machine but force you to move away from using your programming language’s package manager.

Spack is also promising and similar in use to Nix and Guix. Multiple package versions can exist peacefully on one machine and include all dependencies (both for the programming language and the system).

ReproZip allows you develop using a programming language’s package manager. When you run an experiment on command line through reprozip, reprozip traces the running process to figure out what was used during the run. ReproZip can then be used to archive and distribute your experiments (either as a Docker image or a using Vagrant).

If you need other forms of isolation such as network isolation, however, package managers do not implement that functionality.

Of these other solutions I’ve only tried Guix and programming language package managers (like Packrat [R] and virtualenv [Python]) so take what I say with a grain of salt.

Thanks Calvin,

This is a great tutorial of some new developments for the ABM community. The steps to do the dockerization seem now quite comprehensive, but I trust some intuitive interface will emerge over time for some of the common workflows ABMers are using. It is also great to see that the wolf-sheep model analysis @abaezacastro and @felixjohn worked on is used again.