Kaggle Python docker

Kaggle Python docker 映像。「Kaggle Python docker image」

Github星跟蹤圖

docker-python

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

./build

Flags:

  • --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:

./test

Flags:

  • --gpu to test the GPU image.
  • --pattern test_keras.py or -p test_keras.py to run a single test
  • --image gcr.io/kaggle-images/python:ci-pretest or -i gcr.io/kaggle-images/python:ci-pretest to test against a specific 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 gcr.io
docker run --rm -it gcr.io/kaggle-images/python /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 gcr.io
docker run --runtime nvidia --rm -it gcr.io/kaggle-gpu-images/python /bin/bash

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

主要指標

概覽
名稱與所有者Kaggle/docker-python
主編程語言Python
編程語言Python (語言數: 6)
平台
許可證Apache License 2.0
所有者活动
創建於2015-04-14 01:45:38
推送於2025-10-13 17:52:08
最后一次提交
發布數259
最新版本名稱400ac06b974e3cb52d8606ffd9e6eb037da555e6d23df9dec34fc5677767e226 (發布於 )
第一版名稱v80 (發布於 )
用户参与
星數2.6k
關注者數93
派生數1k
提交數2.4k
已啟用問題?
問題數378
打開的問題數23
拉請求數856
打開的拉請求數12
關閉的拉請求數243
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?