This is just a minimal introduction to Docker. The goal is to jump-start moving forward from research to production. Docker containers establish a very lightweight virtualization solution that may support the reproducibility and portability of ML model development and deployment.
-
Install the Docker Engine.
- On Linux distributions adopting the systemd service manager, which is the majority,
one may then need to start Docker by running
sudo systemctl start docker
. - Try
sudo -i
or, better yet,sudo -s
, if you find continuoussudo
-ing annoying. At the very least, the commands below have to be run with root privileges. - You may want to familiarize yourself with some Docker commands, for example by consulting
docker help
.
- On Linux distributions adopting the systemd service manager, which is the majority,
one may then need to start Docker by running
-
Make sure that everything works properly:
docker run hello-world
-
Build an image from the shipped dockerfile:
docker build -t my-image .
-
Create and run a container from the image:
docker run -p 8888:8888 my-image