├── docker-compose.yml ├── app └── jupyter-notebook-config.py ├── README.md └── Dockerfile /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | DSVM: 5 | build: . 6 | image: datascience -------------------------------------------------------------------------------- /app/jupyter-notebook-config.py: -------------------------------------------------------------------------------- 1 | import os 2 | from IPython.lib import passwd 3 | 4 | c = c # pylint:disable=undefined-variable 5 | c.NotebookApp.ip = '*' 6 | c.NotebookApp.port = int(os.getenv('PORT', 8888)) 7 | c.NotebookApp.open_browser = False 8 | 9 | # sets a password if PASSWORD is set in the environment 10 | if 'PASSWORD' in os.environ: 11 | password = os.environ['PASSWORD'] 12 | if password: 13 | c.NotebookApp.password = passwd(password) 14 | else: 15 | c.NotebookApp.password = '' 16 | c.NotebookApp.token = '' 17 | del os.environ['PASSWORD'] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker ML | Report Bee 2 | 3 | ![Docker Stars](https://img.shields.io/docker/stars/reportbee/datascience.svg?style=flat-square) ![Docker Pulls](https://img.shields.io/docker/pulls/reportbee/datascience.svg?style=flat-square) Build with 🍯 by 🐝🐝🐝 4 | 5 | The docker image comes with the following installed packages 6 | 7 | - Python Version: 3.6 8 | - Tensorflow - 1.7 9 | - Tensorflow Object detection and its dependencies 10 | - Keras (latest) 11 | - Numpy 1.13.3 12 | - Scipy (latest) 13 | - Sklearn (latest) 14 | - Open CV (latest) 15 | - Scikit Image (latest) 16 | - Matplotlib (latest) 17 | - Jupyter Notebook (latest) 18 | - Pillow (latest) 19 | 20 | # How to run 21 | 22 | 1. Install Docker CE ([Install]) 23 | 2. Pull image - `docker pull reportbee/datascience` 24 | 3. Run image - `docker run --rm -d -p 6006:6006 -p 8888:8888 reportbee/datascience:latest` 25 | 4. Open your browser and goto localhost:8888 and use the password `reportbee` to login to the jupyter notebook 26 | 27 | # Quick References 28 | 29 | - **Where to raise issues ?** 30 | [Github Issues] 31 | - **Maintained by** 32 | [Report Bee] 33 | - **Image Source** 34 | [Github] 35 | - **Medium** 36 | [Article] 37 | 38 | [Install]: 39 | [Github]: 40 | [Github Issues]: 41 | [Report Bee]: 42 | [Article]: -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.6-jessie 2 | 3 | LABEL maintainer="Report Bee " 4 | 5 | 6 | RUN apt-get update 7 | # Pick up some TF dependencies 8 | RUN apt-get install -y software-properties-common 9 | RUN apt-get install -y curl 10 | RUN apt-get install -y unzip 11 | RUN apt-get install -y build-essential 12 | RUN apt-get install -y libfreetype6-dev 13 | RUN apt-get install -y libhdf5-serial-dev 14 | RUN apt-get install -y libpng-dev 15 | RUN apt-get install -y libzmq3-dev 16 | RUN apt-get install -y pkg-config 17 | RUN apt-get install -y vim 18 | RUN apt-get install wget 19 | RUN apt-get -y install python3-pip 20 | 21 | #OPENCV dependencies 22 | # https://stackoverflow.com/questions/47113029/importerror-libsm-so-6-cannot-open-shared-object-file-no-such-file-or-directo 23 | RUN apt-get install -y libsm6 libxext6 24 | RUN apt-get install -y libfontconfig1 libxrender1 25 | 26 | RUN pip3 install Pillow 27 | RUN pip3 install h5py 28 | RUN pip3 install ipykernel 29 | RUN pip3 install jupyter 30 | RUN pip3 install matplotlib 31 | #Fix numpy to 1.13.3 32 | RUN pip3 install numpy==1.13.3 33 | RUN pip3 install pandas 34 | RUN pip3 install scipy 35 | RUN pip3 install sklearn 36 | RUN pip3 install keras 37 | RUN pip3 install opencv-python 38 | RUN pip3 install scikit-image 39 | RUN pip3 install tensorflow==1.7.0 40 | RUN python3 -m ipykernel.kernelspec 41 | 42 | # For Jupyter notebook 43 | EXPOSE 8888 44 | #For TensorBoard 45 | EXPOSE 6006 46 | 47 | WORKDIR ~/app 48 | 49 | #Setup Tensorflow object detection 50 | RUN git clone https://github.com/tensorflow/models.git 51 | 52 | # RUN apt-get install -y protobuf-compiler 53 | RUN pip3 install Cython 54 | RUN pip3 install lxml 55 | 56 | # https://github.com/tensorflow/models/issues/4002 57 | # Installing Protobuf 58 | RUN curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip 59 | RUN unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 60 | RUN mv protoc3/bin/* /usr/local/bin/ 61 | RUN mv protoc3/include/* /usr/local/include/ 62 | RUN rm protoc-3.2.0-linux-x86_64.zip 63 | RUN rm -rf protoc3 64 | 65 | # RUN cd models/research 66 | # RUN protoc ./models/research/object_detection/protos/*.proto --python_out=. 67 | RUN cd models/research && protoc ./object_detection/protos/*.proto --python_out=. 68 | 69 | # # From tensorflow/models/research/ 70 | RUN echo 'export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim' >> ~/.bashrc 71 | 72 | RUN jupyter notebook --generate-config 73 | 74 | COPY ./app/jupyter-notebook-config.py /root/.jupyter/jupyter_notebook_config.py 75 | 76 | ENV PASSWORD reportbee 77 | 78 | CMD ["jupyter", "notebook", "--allow-root"] 79 | --------------------------------------------------------------------------------