3. Containerizing R and R Packages for Ultimate Reproducibility

This section consists of four parts. Part a is a reference material, parts b, c, and d are tutorials, but you probably will not have time to go through both in class, so choose one of them to do in class and do the rest at home.
The overview of how containers work: Get Familiar with
DockerandBinder. This is more of a reference material that explains some technicalities ofDocker(one of the popular containerization software) andBinder(an online service that allows you to run a container withRandRStudioin the cloud with just a web browser).A tutorial for making your own git repository reproducible in
Binder. It focuses on how to setup yourgitrepository in such a way, so that anyone can run it in the cloud usingBinderwith just a web browser. The primary use case for this is publishing a reproducible repository for a research project, primarily with code that reproduces figures from raw data or pre-calculated and cached modelling results.Binderis limited in memory and compute power, so it will not handle long running resource intensive computation.A tutorial for building your own
Dockercontainer image withRand R packages pre-installed and run it locally. It covers the process of customizing theDockerfileand building the container image locally on your computer. You would normally use such container image for everyday work locally on in the academic High Performance Computing (HPC) cluster or on your own personal computer. Note: due to recent changes toPlay with Docker, you will not be able to build large container images, therefore if you do not haveDockerinstalled on your computer, you will only be able to usePlay with Dockerto build a slighly simpler container image that is unrelated to the project we were working on in other parts of the tutorial.A tutorial for those who want to try
Docker, but cannot install it.Play with Dockerallows a similar experience in a web browser. TryDockerin a web browser viaPlay with Docker.