Borda / docker-kaggle

Kaggle Python docker image

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Kaggle Notebooks allow users to run a Python Notebook in the cloud against our competitions and datasets without having to download data or set up their environment.

This repository includes the Dockerfile for building the CPU-only and GPU image that runs Python Notebooks on Kaggle.

Our Python Docker images are stored on the Google Container Registry at:

Requesting new packages

First, evaluate whether installing the package yourself in your own notebooks suits your needs. See guide.

If you the first step above doesn't work for your use case, open an issue or a pull request.

Opening a pull request

  1. Edit the Dockerfile.
  2. Follow the instructions below to build a new image.
  3. Add tests for your new package. See this example.
  4. Follow the instructions below to test the new image.
  5. Open a PR on this repo and you are all set!

Building a new image



  • --gpu to build an image for GPU.
  • --use-cache for faster iterative builds.

Testing a new image

A suite of tests can be found under the /tests folder. You can run the test using this command:



  • --gpu to test the GPU image.

Running the image

For the CPU-only image:

# Run the image built locally:
docker run --rm -it kaggle/python-build /bin/bash
# Run the pre-built image from
docker run --rm -it /bin/bash

For the GPU image:

# Run the image built locally:
docker run --runtime nvidia --rm -it kaggle/python-gpu-build /bin/bash
# Run the image pre-built image from
docker run --runtime nvidia --rm -it /bin/bash

To ensure your container can access the GPU, follow the instructions posted here.

ezoic increase your site revenue


Kaggle Python docker image

License:Apache License 2.0


Language:Python 87.2%Language:Shell 8.4%Language:Dockerfile 3.1%Language:Jupyter Notebook 1.0%Language:Smarty 0.3%