README.md 1.77 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
# Tiny Distroless Dockerfile for LightGBM GPU CLI-only Version

`dockerfile-cli-only-distroless.gpu` - A multi-stage build based on the `nvidia/opencl:devel` (build) and `distroless/cc-debian10` (production) images. LightGBM (CLI-only) can be utilized in GPU and CPU modes. The resulting image size is around 15 MB.

---

# Small Dockerfile for LightGBM GPU CLI-only Version

`dockerfile-cli-only.gpu` - A multi-stage build based on the `nvidia/opencl:devel` (build) and `nvidia/opencl:runtime` (production) images. LightGBM (CLI-only) can be utilized in GPU and CPU modes. The resulting image size is around 100 MB.

---

13
14
# Dockerfile for LightGBM GPU Version with Python

15
`dockerfile.gpu` - A docker file with LightGBM utilizing nvidia-docker. The file is based on the `nvidia/cuda:8.0-cudnn5-devel` image.
Nikita Titov's avatar
Nikita Titov committed
16
LightGBM can be utilized in GPU and CPU modes and via Python (2.7 & 3.6).
17
18
19

## Contents

20
- LightGBM (cpu + gpu)
Nikita Titov's avatar
Nikita Titov committed
21
22
- Python 2.7 (conda) + scikit-learn, notebooks, pandas, matplotlib
- Python 3.6 (conda) + scikit-learn, notebooks, pandas, matplotlib
23

Nikita Titov's avatar
Nikita Titov committed
24
Running the container starts a Jupyter Notebook at `localhost:8888`.
25

Nikita Titov's avatar
Nikita Titov committed
26
Jupyter password: `keras`.
27
28
29

## Requirements

30
31
Requires docker and [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) on host machine.

32
33
34
35
## Quickstart

### Build Docker Image

36
37
38
```sh
mkdir lightgbm-docker
cd lightgbm-docker
firasrb's avatar
firasrb committed
39
wget https://raw.githubusercontent.com/Microsoft/LightGBM/master/docker/gpu/dockerfile.gpu
40
41
docker build -f dockerfile.gpu -t lightgbm-gpu .
```
42
43
44

### Run Image

45
46
47
48
```sh
nvidia-docker run --rm -d --name lightgbm-gpu -p 8888:8888 -v /home:/home lightgbm-gpu
```

49
50
### Attach with Command Line Access (if required)

51
52
53
```sh
docker exec -it lightgbm-gpu bash
```
54
55
56

### Jupyter Notebook

57
58
59
```sh
localhost:8888
```