|
| 1 | +# machine learning gears |
| 2 | +FROM gcr.io/tensorflow/tensorflow:latest-devel-gpu |
| 3 | +MAINTAINER Marsan Ma < [email protected]> |
| 4 | + |
| 5 | +#--------------------------------- |
| 6 | +# basic tools |
| 7 | +#--------------------------------- |
| 8 | +RUN apt-get update |
| 9 | +RUN apt-get install -y wget htop vim unzip procps |
| 10 | + |
| 11 | +#--------------------------------- |
| 12 | +# kaggle/python layers |
| 13 | +#--------------------------------- |
| 14 | +# Anaconda3 (https://hub.docker.com/r/continuumio/anaconda3/~/dockerfile/) |
| 15 | +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 |
| 16 | + |
| 17 | +RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \ |
| 18 | + libglib2.0-0 libxext6 libsm6 libxrender1 \ |
| 19 | + git mercurial subversion |
| 20 | + |
| 21 | +RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \ |
| 22 | + wget --quiet https://repo.continuum.io/archive/Anaconda3-4.1.0-Linux-x86_64.sh -O ~/anaconda.sh && \ |
| 23 | + /bin/bash ~/anaconda.sh -b -p /opt/conda && \ |
| 24 | + rm ~/anaconda.sh |
| 25 | + |
| 26 | +RUN apt-get install -y curl grep sed dpkg && \ |
| 27 | + TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \ |
| 28 | + curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \ |
| 29 | + dpkg -i tini.deb && \ |
| 30 | + rm tini.deb && \ |
| 31 | + apt-get clean |
| 32 | + |
| 33 | +ENV PATH /opt/conda/bin:$PATH |
| 34 | + |
| 35 | +# kaggle/python0 (https://hub.docker.com/r/kaggle/python0/~/dockerfile/) |
| 36 | +RUN apt-get install -y build-essential python-software-properties |
| 37 | + |
| 38 | +# kaggle/python1 (https://hub.docker.com/r/kaggle/python1/~/dockerfile/) |
| 39 | +RUN pip install seaborn python-dateutil spacy dask pytagcloud pyyaml ggplot joblib \ |
| 40 | + husl geopy ml_metrics mne pyshp gensim && \ |
| 41 | + apt-get install -y libfreetype6-dev && \ |
| 42 | + apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \ |
| 43 | + # textblob |
| 44 | + pip install textblob && \ |
| 45 | + #word cloud |
| 46 | + pip install git+git://github.com/amueller/word_cloud.git |
| 47 | + |
| 48 | +# kaggle/python2 (https://hub.docker.com/r/kaggle/python2/~/dockerfile/) |
| 49 | +RUN apt-get install -y libfreetype6-dev && \ |
| 50 | + apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \ |
| 51 | + # textblob |
| 52 | + # pip install python-igraph && \ |
| 53 | + #xgboost |
| 54 | + cd /usr/local/src && mkdir xgboost && cd xgboost && \ |
| 55 | + git clone --recursive https://github.com/dmlc/xgboost.git && cd xgboost && \ |
| 56 | + make && cd python-package && python setup.py install |
| 57 | + |
| 58 | +# kaggle/python3 (https://hub.docker.com/r/kaggle/python3/~/dockerfile/) |
| 59 | +RUN apt-get -y install zlib1g-dev liblcms2-dev libwebp-dev && \ |
| 60 | + pip install Pillow |
| 61 | + |
| 62 | +# kaggle/python (https://hub.docker.com/r/kaggle/python/~/dockerfile/) |
| 63 | +#RUN cd /usr/local/src && git clone https://github.com/scikit-learn/scikit-learn.git && \ |
| 64 | +# cd scikit-learn && python setup.py build && python setup.py install && \ |
| 65 | +RUN conda install scikit-learn |
| 66 | +# HDF5 support |
| 67 | +RUN conda install h5py |
| 68 | + |
| 69 | +RUN pip install --upgrade mpld3 && \ |
| 70 | + pip install mplleaflet && \ |
| 71 | + pip install gpxpy && \ |
| 72 | + pip install arrow && \ |
| 73 | + pip install sexmachine && \ |
| 74 | + pip install Geohash && \ |
| 75 | + pip install deap && \ |
| 76 | + pip install tpot && \ |
| 77 | + pip install haversine && \ |
| 78 | + pip install toolz cytoolz && \ |
| 79 | + pip install sacred && \ |
| 80 | + pip install plotly && \ |
| 81 | + pip install git+https://github.com/nicta/dora.git && \ |
| 82 | + pip install git+https://github.com/hyperopt/hyperopt.git && \ |
| 83 | + # tflean. Deep learning library featuring a higher-level API for TensorFlow. http://tflearn.org |
| 84 | + #pip install git+https://github.com/tflearn/tflearn.git && \ |
| 85 | + pip install fitter && \ |
| 86 | + pip install langid && \ |
| 87 | + # Delorean. Useful for dealing with datetime |
| 88 | + pip install delorean |
| 89 | + |
| 90 | +#--------------------------------- |
| 91 | +# Marsan's toolbelt |
| 92 | +#--------------------------------- |
| 93 | +RUN conda install mkl |
| 94 | +RUN conda install libgfortran |
| 95 | + |
| 96 | +RUN pip install -U \ |
| 97 | + pandas \ |
| 98 | + mongoengine \ |
| 99 | + bottle \ |
| 100 | + cherrypy \ |
| 101 | + jieba3k \ |
| 102 | + yolk3k \ |
| 103 | + azure \ |
| 104 | + cython \ |
| 105 | + html5lib \ |
| 106 | + pyyaml \ |
| 107 | + demjson \ |
| 108 | + hanziconv \ |
| 109 | + ftfy \ |
| 110 | + hiredis \ |
| 111 | + google-api-python-client |
| 112 | + |
| 113 | +RUN pip install -U \ |
| 114 | + Django \ |
| 115 | + django-pipeline \ |
| 116 | + django-bootstrap3 \ |
| 117 | + django_compressor \ |
| 118 | + rest-pandas \ |
| 119 | + gunicorn \ |
| 120 | + boto3 \ |
| 121 | + PyMySQL |
| 122 | + |
| 123 | +RUN pip install \ |
| 124 | + djangoajax \ |
| 125 | + django-dashing |
| 126 | + |
| 127 | + |
| 128 | +# MySQL |
| 129 | +RUN apt-get install -y python3-dev libmysqlclient-dev |
| 130 | +RUN pip install mysqlclient |
| 131 | + |
| 132 | + |
| 133 | +# pathos (python parallel process) |
| 134 | +#RUN pip install -U git+https://github.com/uqfoundation/pathos.git@master |
| 135 | + |
| 136 | +#RUN pip install -U \ |
| 137 | +# newspaper3k |
| 138 | + |
| 139 | +# Tensorflow GPU supported version |
| 140 | +RUN pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp35-cp35m-linux_x86_64.whl |
| 141 | + |
| 142 | +#--------------------------------- |
| 143 | +# Enviroment |
| 144 | +#--------------------------------- |
| 145 | +# Timezone |
| 146 | +RUN echo "Asia/Taipei" > /etc/timezone |
| 147 | +RUN dpkg-reconfigure -f noninteractive tzdata |
| 148 | + |
| 149 | +# Add runner script |
| 150 | +COPY files/runner.sh /runner.sh |
| 151 | +RUN chmod +x /runner.sh |
| 152 | +COPY files/bashrc /.bashrc |
| 153 | +COPY files/vimrc /.vimrc |
| 154 | + |
| 155 | +## Set the working directory |
| 156 | +WORKDIR /home/workspace |
| 157 | +RUN mkdir /home/workspace/notebooks |
| 158 | +#VOLUME /Users/marsan/wordspace |
| 159 | + |
| 160 | +EXPOSE 8880:8900 |
| 161 | + |
| 162 | +ENTRYPOINT ["/runner.sh"] |
0 commit comments