Skip to content

Kaggle's docker python setup

Pandarasamy Arjunan (Samy) edited this page Mar 9, 2020 · 1 revision

Kaggle's docker-python setup

This wiki page will guide you on how to setup docker and use the kaggle/python image.

Docker installation

Follow these links to install the Docker desktop community editiorn on different platforms.

  1. Docker Desktop on Windows
  2. Docker Desktop for Mac
  3. Docker for Linux Servers

After the successful installation, we can verify the docker installation using the below command:

$ docker -v
Docker version 19.03.5, build 633a0ea

CPU-only image

There are two docker images for python by Kaggle is available: CPU-only and GPU. While the CPU-only image is public, the GPU is still kept private. In this post, we will focus on using the CPU-only image.

Pull docker image

Use the below command to pull the CPU-only image:

$ docker pull kaggle/python

This command will take several minutes to download and setup of kaggle/python image locally.

Starting Jupyter notebook within the Docker container

Next, we can start the Jupyter notebook within the installed kaggle/python docker container using this command.

$ docker run -p 8888:8888 -v --rm -it kaggle/python jupyter notebook --ip='0.0.0.0' --port=8888 --no-browser --allow-root

References

  1. Setup docker for Kaggle