Skip to content

Commit a160884

Browse files
authored
Overhaul our README file
1 parent b3c2954 commit a160884

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

README.md

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,62 @@
1-
**Kaggle Kernels** allow users to run scripts against our competitions and datasets without having to download data or set up their environment. Here's [an example](https://www.kaggle.com/devinanzelmo/d/devinanzelmo/dota-2-matches/setting-up-a-prediction-problem-dota-2):
1+
[Kaggle Kernels](https://www.kaggle.com/kernels) 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.
22

3-
![example script](http://i.imgur.com/yrWycNA.png)
3+
This repository includes our Dockerfiles for building the [CPU-only](Dockerfile) and [GPU](gpu.Dockerfile) image that runs Python Kernels on Kaggle.
44

5-
This is the Dockerfile (etc.) used for building the image that runs python scripts on Kaggle. [Here's](https://gcr.io/kaggle-images/python) the Docker image on Google Container Registry.
5+
Our Python Docker images are stored on Google Container Registry at:
6+
7+
* CPU-only: [gcr.io/kaggle-images/python](https://gcr.io/kaggle-images/python)
8+
* GPU: private for now, we will make it public soon.
9+
10+
Note: The base image for the GPU image is our CPU-only image. The [gpu.Dockerfile](gpu.Dockerfile) adds a few extra layers to install GPU related libraries and packages (cuda, libcudnn, pycuda etc.) and reinstall packages with specific GPU builds (torch, tensorflow and a few mores).
611

712
## Getting started
813

914
To get started with this image, read our [guide](http://blog.kaggle.com/2016/02/05/how-to-get-started-with-data-science-in-containers/) to using it yourself, or browse [Kaggle Kernels](https://www.kaggle.com/kernels) for ideas.
1015

11-
## Requesting new features
16+
## Requesting new packages
1217

13-
**We welcome pull requests** if there are any packages you'd like to add!
18+
First, evaluate whether installing the package yourself in your own Kernels suits your needs. See [guide](wiki/Missing-Packages).
1419

15-
We can merge your request quickly if you check that it builds correctly. Here's how to do that.
20+
If you the first step above doesn't work for your use case, [open an issue](https://github.com/Kaggle/docker-python/issues/new) or a [pull request](https://github.com/Kaggle/docker-python/pulls).
1621

17-
Start by running this image on your system:
22+
## Opening a pull request
1823

19-
```
20-
me@my-computer:/home$ docker run --rm -it gcr.io/kaggle-images/python
21-
root@d72b81a003e1:/#
22-
```
24+
1. Update the *Dockerfile*
25+
1. For changes specific to the GPU image, update the [gpu.Dockerfile](gpu.Dockerfile).
26+
2. Otherwise, update the [Dockerfile](Dockerfile).
27+
2. Follow the instructions below to build a new image.
28+
3. Add tests for your new package. See this [example](https://github.com/Kaggle/docker-python/blob/master/tests/test_fastai.py).
29+
4. Follow the instructions below to test the new image.
30+
5. Open a PR on this repo and you are all set!
2331

24-
Then follow the package's installation instructions for a Linux system. It could be as simple as installing via Pip:
32+
## Building a new image
2533

26-
```
27-
root@d72b81a003e1:/# pip install coolpackage
28-
Collecting coolpackage
29-
[...etc...]
34+
```sh
35+
./build
3036
```
3137

32-
Once that's done, check that you can import it correctly. (Sometimes, if a package is missing a dependency, it throws an error when you try to import it.)
38+
Flags:
3339

34-
```
35-
root@d72b81a003e1:/# python
36-
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 2 2016, 17:53:06)
37-
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
38-
Type "help", "copyright", "credits" or "license" for more information.
39-
>>> import coolpackage
40-
>>>
41-
```
40+
* `--gpu` to build an image for GPU.
41+
* `--use-cache` for faster iterative builds.
4242

43-
Once that's working, add the necessary lines to our [Dockerfile](https://github.com/Kaggle/docker-python/blob/master/Dockerfile). (In this case, that would mean adding `pip install coolpackage` to the last section.)
43+
## Testing a new image
4444

45-
Next run the build:
45+
A suite of tests can be found under the `/tests` folder. You can run the test using this command:
4646

47-
```
48-
./build
47+
```sh
48+
./test
4949
```
5050

51-
Finally run the tests:
51+
Flags:
5252

53-
```
54-
./test
55-
```
53+
* `--gpu` to test the GPU image.
5654

57-
Then submit your pull request, and you're all set!
55+
## Tensorflow custom pre-built wheels
5856

57+
We are building Tensorflow from sources mainly for:
5958

59+
* Better performance. When building from sources, we can leverage CPU specific optimizations
60+
* Tensorflow with GPU support must be built from sources
6061

62+
The [Dockerfile](tensorflow-whl/Dockerfile) and the [instructions](tensorflow-whl/README.md) can be found in the [tensorflow-whl folder/](tensorflow/).

0 commit comments

Comments
 (0)