# Containers

![](https://2327526407-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvBP1svpACTB1R1x_U4%2F-LvOFfyfr8WnPebHfBoV%2F-LvOG4k3uFKDVoAjohIO%2Fimage.png?alt=media\&token=08624b66-4958-42f1-84ac-c1e7e368c3fe)

Containers are lightweight, secure, and portable environments designed for developing, testing, and hosting software applications.  Containers run on top of VMs or bare-metal servers and were pioneered by  a company called [Docker](https://www.docker.com/resources/what-container).  They have recently become popular in the ML industry.

Container **orchestration** is dominated by Kubernetes, an open source system for automating and scaling application deployment.&#x20;

Container **registries** are where containers are hosted.  Examples include DockerHub and Amazon ECR.

A Docker file is a set of instructions (software packages to include) in a Docker image.  Deploying applications using Docker containers is straightforward.

* Build: Create an image from a Docker file
* Push: Save image in a registry
* Run: Application can be run anywhere
* Pull: Download containers from a registry

Docker tags specify a version e.g. `username/image_name:tag_name`&#x20;

## Containers + Gradient

Gradient can run any Docker container (for Notebooks, Experiments, Jobs, and Deployments) hosted on a public or private container registry.

Gradient maintains a list of [containers](https://docs.paperspace.com/gradient/notebooks/notebook-containers) pre-loaded with various up-to-date ML frameworks, libraries, drivers, and more.

Gradient also includes a way to build containers from a Dockerfile without any expertise in Docker itself.&#x20;

### Related Material

{% embed url="<https://docs.paperspace.com/gradient/notebooks/notebook-containers/building-a-custom-container>" %}
