What is Docker and how do we use it?

Docker is a container platform that allows us to package Jupyter notebooks into deliverable course environments.

Install Docker Locally

Windows

https://docs.docker.com/docker-for-windows/install/

Mac

https://docs.docker.com/docker-for-mac/install/

Linux

https://docs.docker.com/install/

Take a look at the Docker stacks Repo

  • The MUIIDSA docker-stacks fork is located here.
  • Below is a hierarchy of community supported Docker stacks.

For More info on the Jupyter community Docker images click here.

To view a list of all DSA/Community Docker images that we use click here.

Choose a Dockerfile that is closest to your needs

  • Base - Best for Building a completely customized environment
  • Minimal - Includes basic Python 3 kernel and packages
  • Scipy - Includes Minimal plus Scipy packages
  • Datascience - Includes Scipy plus Julia and R Kernels along with related packages
  • R - Only R kernel and basic R packages
  • Tensorflow - Installs only Tenorflow 1.11 and Keras 2.2
  • All-Spark - Install PySpark, R, and Spylon Kernels with minimal packages

Run Your Container

This will pull the Docker image from DockerHub to your local machine. Please make sure to run the container in the desired directory for Jupyter access.

mkdir jupyter
cd jupyter
docker pull jupyter/datascience-notebook:latest

Note: If when you pull the image you recieve unauthorized: incorrect username or password you may have to run docker logout to pull this image

docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/work jupyter/datascience-notebook:latest

Note: Windows users MUST replace "$PWD" with an absolute path
for example C:\Users\jovyan\jupyter but replacing jovyan with your current username.

You should see output similar to the output below

Access Jupyter in your browser

Copy the token in the output

Open Google Chrome and navigate to http://localhost:8888

Paste in your token and click "Log in"

Voila! Jupyterlab should now be accessible.

NOTE: If you are looking for the classic Jupyter experience, in the url replace "lab" with "tree".