# Docker containerized apps (for scientists)

## Doing things that previously took 0.5 computers using 0.4 computers

### Assumed audience:

People who want to do containerization for machine learning research

### ⚠️ Content warning ⚠️

The needs of ML research people are not the usual scaling-web-apps type needs of many containerization users. Obsolete advice danger.

The most popular containerization solution.

The most common way of doing containerization generally; so common that it is easiest to define the alternatives with reference to this. It is, however, often not the best suited task for my particular needs, which are research-oriented.

Docker is well supported but has awful terminology, riven with confusing analogies, and poor explanation. Fortunately we have Julia Evans who explains at least the filesystem, overlayfs by example. the google best practice page also has good illustrations which make it clear what is going on. See also the docker cheat sheet, as noted by digithead, who also explains the annoying terminology:

Docker terminology has spawned some confusion. For instance: images vs. containers and registry vs. repository. Luckily, there’s help, for example this stack-overflow post by a brilliant, but under-appreciated, hacker on the difference between images and containers.

• Registry - a service that stores image repositories
• Repository - a set of Docker images, usually versions of the same application
• Image - an immutable snapshot of a running container. An image consists of layers of file system changes stacked up on top of a base image.
• Container - a runtime instance of an image

Essentially with Docker you provide a recipe for building a reproducible execution environment and the infrastructure will ensure that environment exists for your program. The recipe is ideally encapsulated in the Dockerfile. The costs of this is that it is somewhat more clunky to set things up. The benefit is that setting things up the second time and all subsequent times is in principle effortless and portable.

## Installation

There is a GUI for all this called Dock station which might make some steps easier on some platforms. TBC.

### Linux

Installing docker is easy. Do not forget to give yourself permission to actually run docker:

sudo groupadd docker

## Kubernetes

Kubernetes is a large scale container automation system. I don’t need kubernetes since I am not in a team with 500 engineers.

### No comments yet. Why not leave one?

GitHub-flavored Markdown & a sane subset of HTML is supported.