├── README.md ├── build.sh ├── cpu ├── Dockerfile.all ├── Dockerfile.base ├── Dockerfile.lightgbm ├── Dockerfile.mxnet ├── Dockerfile.pytorch ├── Dockerfile.tensorflow └── Dockerfile.xgboost └── gpu ├── Dockerfile.all ├── Dockerfile.base ├── Dockerfile.lightgbm ├── Dockerfile.mxnet ├── Dockerfile.pytorch ├── Dockerfile.tensorflow └── Dockerfile.xgboost /README.md: -------------------------------------------------------------------------------- 1 | ## General info 2 | Presets for docker containers which can be used in dbrain contests. 3 | All images can be downloaded from https://hub.docker.com/u/dbrain. 4 | ## Description 5 | There are `gpu` and `cpu` versions of most common ds frameworks. 6 | 7 | All contests required to be written in python3 (v3.6). 8 | 9 | Every preset extends dbrain/base. 10 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -xe 4 | 5 | cd "$(dirname "$0")" 6 | 7 | push () { 8 | folder="$1" 9 | image="$2" 10 | tag="$3" 11 | 12 | docker build -t "dbrain/$image:$tag" -f "$folder/Dockerfile.$image" "$folder" 13 | docker push "dbrain/$image:$tag" 14 | } 15 | 16 | push cpu base latest 17 | push cpu lightgbm latest 18 | push cpu mxnet latest 19 | push cpu pytorch latest 20 | push cpu tensorflow latest 21 | push cpu xgboost latest 22 | push cpu all latest 23 | 24 | push gpu base gpu 25 | push gpu lightgbm gpu 26 | push gpu mxnet gpu 27 | push gpu pytorch gpu 28 | push gpu tensorflow gpu 29 | push gpu xgboost gpu 30 | push gpu all gpu 31 | -------------------------------------------------------------------------------- /cpu/Dockerfile.all: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:latest 2 | 3 | RUN pip install --no-cache-dir \ 4 | lightgbm==2.1.2 \ 5 | mxnet==1.2.1.post1 \ 6 | http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-linux_x86_64.whl \ 7 | tensorboardX==1.4 \ 8 | torchvision==0.2.1 \ 9 | keras==2.1.6 \ 10 | tensorboard==1.10.0 \ 11 | tensorflow==1.10.0 \ 12 | xgboost==0.80 13 | -------------------------------------------------------------------------------- /cpu/Dockerfile.base: -------------------------------------------------------------------------------- 1 | FROM python:3.6-jessie 2 | 3 | RUN apt-get update && apt-get install -y \ 4 | git \ 5 | wget \ 6 | curl \ 7 | unzip \ 8 | yasm \ 9 | pkg-config \ 10 | libblas-dev \ 11 | liblapack-dev \ 12 | libatlas-base-dev \ 13 | gfortran \ 14 | build-essential \ 15 | libsm6 \ 16 | libxext6 \ 17 | libfontconfig1 \ 18 | libxrender1 \ 19 | libswscale-dev \ 20 | libtbb2 \ 21 | libtbb-dev \ 22 | libjpeg-dev \ 23 | libpng-dev \ 24 | libtiff-dev \ 25 | libjasper-dev \ 26 | libavformat-dev \ 27 | libpq-dev \ 28 | && apt-get clean \ 29 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 30 | 31 | # Install common ds packages 32 | RUN pip install --upgrade --no-cache-dir pip && pip install --no-cache-dir \ 33 | catboost==0.8.1.1 \ 34 | cycler==0.10.0 \ 35 | decorator==4.3.0 \ 36 | dill==0.2.8.2 \ 37 | h5py==2.7.1 \ 38 | imgaug==0.2.5 \ 39 | kiwisolver==1.0.1 \ 40 | matplotlib==2.2.2 \ 41 | networkx==2.1 \ 42 | numpy==1.14.3 \ 43 | opencv-contrib-python==3.4.2.17 \ 44 | pandas==0.23.0 \ 45 | Pillow==5.1.0 \ 46 | pyparsing==2.2.0 \ 47 | python-dateutil==2.7.3 \ 48 | pytz==2018.4 \ 49 | PyWavelets==0.5.2 \ 50 | scikit-image==0.13.1 \ 51 | scikit-learn==0.19.1 \ 52 | scipy==1.1.0 \ 53 | setuptools==39.1.0 \ 54 | Shapely==1.6.4.post1 \ 55 | six==1.11.0 \ 56 | tqdm==4.23.4 57 | -------------------------------------------------------------------------------- /cpu/Dockerfile.lightgbm: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:latest 2 | 3 | RUN pip install --no-cache-dir lightgbm==2.1.2 4 | -------------------------------------------------------------------------------- /cpu/Dockerfile.mxnet: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:latest 2 | 3 | RUN pip install --no-cache-dir mxnet==1.2.1.post1 4 | -------------------------------------------------------------------------------- /cpu/Dockerfile.pytorch: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:latest 2 | 3 | RUN pip install --no-cache-dir \ 4 | http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-linux_x86_64.whl \ 5 | tensorboardX==1.4 \ 6 | torchvision==0.2.1 7 | -------------------------------------------------------------------------------- /cpu/Dockerfile.tensorflow: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:latest 2 | 3 | RUN pip install --no-cache-dir \ 4 | keras==2.1.6 \ 5 | tensorboard==1.10.0 \ 6 | tensorflow==1.10.0 7 | -------------------------------------------------------------------------------- /cpu/Dockerfile.xgboost: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:latest 2 | 3 | RUN pip install --no-cache-dir xgboost==0.80 4 | -------------------------------------------------------------------------------- /gpu/Dockerfile.all: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:gpu 2 | 3 | RUN pip install --no-cache-dir \ 4 | http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl \ 5 | keras==2.1.6 \ 6 | mxnet-cu91==1.2.1.post1 \ 7 | tensorboard==1.10.0 \ 8 | tensorboardX==1.4 \ 9 | tensorflow-gpu==1.10.0 \ 10 | torchvision==0.2.1 11 | 12 | RUN git clone --recursive https://github.com/dmlc/xgboost \ 13 | && cd xgboost \ 14 | && git checkout tags/v0.80 \ 15 | && mkdir build \ 16 | && cd build \ 17 | && cmake .. -DUSE_CUDA=ON \ 18 | && make -j4 \ 19 | && cd ../python-package \ 20 | && python setup.py install \ 21 | && cd ../.. \ 22 | && rm -rf xgboost 23 | 24 | RUN git clone --recursive https://github.com/Microsoft/LightGBM \ 25 | && cd LightGBM \ 26 | && git checkout tags/v2.1.2 \ 27 | && mkdir build \ 28 | && cd build \ 29 | && cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..\ 30 | && make -j4 \ 31 | && cd ../python-package \ 32 | && python setup.py install --precompile \ 33 | && cd ../.. \ 34 | && rm -rf LightGBM 35 | -------------------------------------------------------------------------------- /gpu/Dockerfile.base: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:9.0-cudnn7-devel 2 | 3 | RUN apt-get update -y && apt-get install -y \ 4 | git \ 5 | wget \ 6 | curl \ 7 | cmake \ 8 | unzip \ 9 | yasm \ 10 | pkg-config \ 11 | libblas-dev \ 12 | liblapack-dev \ 13 | libatlas-base-dev \ 14 | gfortran \ 15 | build-essential \ 16 | libsm6 \ 17 | libxext6 \ 18 | libfontconfig1 \ 19 | libxrender1 \ 20 | libswscale-dev \ 21 | libtbb2 \ 22 | libtbb-dev \ 23 | libjpeg-dev \ 24 | libpng-dev \ 25 | libtiff-dev \ 26 | libjasper-dev \ 27 | libavformat-dev \ 28 | libpq-dev \ 29 | libboost-dev \ 30 | libboost-system-dev \ 31 | libboost-filesystem-dev \ 32 | software-properties-common 33 | 34 | # Install python 35 | RUN add-apt-repository -y ppa:jonathonf/python-3.6 \ 36 | && apt-get update -y \ 37 | && apt-get install -y python3.6 python3.6-dev \ 38 | && ln -sfn /usr/bin/python3.6 /usr/local/bin/python \ 39 | && ln -sfn /usr/bin/python3.6 /usr/bin/python3 \ 40 | && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ 41 | && python get-pip.py \ 42 | && rm get-pip.py \ 43 | && apt-get clean \ 44 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 45 | 46 | RUN pip install --upgrade --no-cache-dir pip && pip install --no-cache-dir \ 47 | catboost==0.8.1.1 \ 48 | cycler==0.10.0 \ 49 | decorator==4.3.0 \ 50 | dill==0.2.8.2 \ 51 | h5py==2.7.1 \ 52 | imgaug==0.2.5 \ 53 | kiwisolver==1.0.1 \ 54 | matplotlib==2.2.2 \ 55 | networkx==2.1 \ 56 | numpy==1.14.3 \ 57 | opencv-contrib-python==3.4.2.17 \ 58 | pandas==0.23.0 \ 59 | Pillow==5.1.0 \ 60 | pyparsing==2.2.0 \ 61 | python-dateutil==2.7.3 \ 62 | pytz==2018.4 \ 63 | PyWavelets==0.5.2 \ 64 | scikit-image==0.13.1 \ 65 | scikit-learn==0.19.1 \ 66 | scipy==1.1.0 \ 67 | setuptools==39.1.0 \ 68 | Shapely==1.6.4.post1 \ 69 | six==1.11.0 \ 70 | tqdm==4.23.4 71 | -------------------------------------------------------------------------------- /gpu/Dockerfile.lightgbm: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:gpu 2 | 3 | RUN git clone --recursive https://github.com/Microsoft/LightGBM \ 4 | && cd LightGBM \ 5 | && git checkout tags/v2.1.2 \ 6 | && mkdir build \ 7 | && cd build \ 8 | && cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..\ 9 | && make -j4 \ 10 | && cd ../python-package \ 11 | && python setup.py install --precompile \ 12 | && cd ../.. \ 13 | && rm -rf LightGBM 14 | -------------------------------------------------------------------------------- /gpu/Dockerfile.mxnet: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:gpu 2 | 3 | RUN pip install --no-cache-dir mxnet-cu91==1.2.1.post1 4 | -------------------------------------------------------------------------------- /gpu/Dockerfile.pytorch: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:gpu 2 | 3 | RUN pip install --no-cache-dir \ 4 | http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl \ 5 | tensorboardX==1.4 \ 6 | torchvision==0.2.1 7 | -------------------------------------------------------------------------------- /gpu/Dockerfile.tensorflow: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:gpu 2 | 3 | RUN pip install --no-cache-dir \ 4 | keras==2.1.6 \ 5 | tensorboard==1.10.0 \ 6 | tensorflow-gpu==1.10.0 7 | -------------------------------------------------------------------------------- /gpu/Dockerfile.xgboost: -------------------------------------------------------------------------------- 1 | FROM dbrain/base:gpu 2 | 3 | RUN git clone --recursive https://github.com/dmlc/xgboost \ 4 | && cd xgboost \ 5 | && git checkout tags/v0.80 \ 6 | && mkdir build \ 7 | && cd build \ 8 | && cmake .. -DUSE_CUDA=ON \ 9 | && make -j4 \ 10 | && cd ../python-package \ 11 | && python setup.py install \ 12 | && cd ../.. \ 13 | && rm -rf xgboost 14 | --------------------------------------------------------------------------------