diff --git a/datascience-notebook/.gitignore b/datascience-notebook/.gitignore new file mode 100644 index 00000000..b25c15b8 --- /dev/null +++ b/datascience-notebook/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/datascience-notebook/Dockerfile b/datascience-notebook/Dockerfile index 04d19234..b354d8ea 100644 --- a/datascience-notebook/Dockerfile +++ b/datascience-notebook/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get update && \ gfortran \ gcc && apt-get clean +# Julia dependencies +RUN apt-get install -y julia libnettle4 && apt-get clean + USER jovyan @@ -76,5 +79,9 @@ RUN conda install --yes \ 'r-rcurl=1.95*' \ 'r-randomforest=4.6*' && conda clean -yt +# IJulia and Julia packages +RUN julia -e 'Pkg.add("IJulia")' +RUN julia -e 'Pkg.add("Gadfly")' && julia -e 'Pkg.add("RDatasets")' + # Switch back to root so that supervisord runs under that user USER root diff --git a/datascience-notebook/Dockerfile~ b/datascience-notebook/Dockerfile~ index e69de29b..04d19234 100644 --- a/datascience-notebook/Dockerfile~ +++ b/datascience-notebook/Dockerfile~ @@ -0,0 +1,80 @@ +FROM jupyter/minimal-notebook + +MAINTAINER Jupyter Project + +# R pre-requisites +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libxrender1 \ + fonts-dejavu \ + gfortran \ + gcc && apt-get clean + + +USER jovyan + + +# Install Python 3 packages +RUN conda install --yes \ + 'pandas=0.16*' \ + 'matplotlib=1.4*' \ + 'scipy=0.15*' \ + 'seaborn=0.6*' \ + 'scikit-learn=0.16*' \ + 'scikit-image=0.11*' \ + 'sympy=0.7*' \ + 'cython=0.22*' \ + 'patsy=0.3*' \ + 'statsmodels=0.6*' \ + 'cloudpickle=0.1*' \ + 'dill=0.2*' \ + 'numba=0.20*' \ + 'bokeh=0.9*' \ + && conda clean -yt + +# Install Python 2 packages and kernel spec +RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \ + 'ipython=3.2*' \ + 'pandas=0.16*' \ + 'matplotlib=1.4*' \ + 'scipy=0.15*' \ + 'seaborn=0.6*' \ + 'scikit-learn=0.16*' \ + 'scikit-image=0.11*' \ + 'sympy=0.7*' \ + 'cython=0.22*' \ + 'patsy=0.3*' \ + 'statsmodels=0.6*' \ + 'cloudpickle=0.1*' \ + 'dill=0.2*' \ + 'numba=0.20*' \ + 'bokeh=0.9*' \ + pyzmq \ + && conda clean -yt +RUN $CONDA_DIR/envs/python2/bin/python \ + $CONDA_DIR/envs/python2/bin/ipython \ + kernelspec install-self --user + +# R packages +RUN conda config --add channels r +RUN conda install --yes \ + 'r-base=3.2*' \ + 'r-irkernel=0.4*' \ + 'r-plyr=1.8*' \ + 'r-devtools=1.8*' \ + 'r-dplyr=0.4*' \ + 'r-ggplot2=1.0*' \ + 'r-tidyr=0.2*' \ + 'r-shiny=0.12*' \ + 'r-rmarkdown=0.7*' \ + 'r-forecast=5.8*' \ + 'r-stringr=0.6*' \ + 'r-rsqlite=1.0*' \ + 'r-reshape2=1.4*' \ + 'r-nycflights13=0.1*' \ + 'r-caret=6.0*' \ + 'r-rcurl=1.95*' \ + 'r-randomforest=4.6*' && conda clean -yt + +# Switch back to root so that supervisord runs under that user +USER root diff --git a/datascience-notebook/README.md b/datascience-notebook/README.md index 9d74ec3c..e0cfa754 100644 --- a/datascience-notebook/README.md +++ b/datascience-notebook/README.md @@ -1,4 +1,4 @@ -# Jupyter Notebook Scientific Python Stack +# Jupyter Notebook Data Science Stack ## What it Gives You diff --git a/datascience-notebook/README.md~ b/datascience-notebook/README.md~ index e69de29b..9d74ec3c 100644 --- a/datascience-notebook/README.md~ +++ b/datascience-notebook/README.md~ @@ -0,0 +1,30 @@ +# Jupyter Notebook Scientific Python Stack + +## What it Gives You + +* Jupyter Notebook server v3.2.x +* Conda Python 3.4.x and Python 2.7.x environments +* pandas, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh pre-installed +* Conda R v3.2.x and channel +* plyr, devtools, dplyr, ggplot2, tidyr, shiny, rmarkdown, forecast, stringr, rsqlite, reshape2, nycflights13, caret, rcurl, and randomforest pre-installed +* Options for HTTPS, password auth, and passwordless `sudo` + +## Basic Use + +The following command starts a container with the Notebook server listening for HTTP connections on port 8888 without authentication configured. + +``` +docker run -d -p 8888:8888 jupyter/scipy-notebook +``` + +## Options + +You may customize the execution of the Docker container and the Notebook server it contains with the following optional arguments. + +* `-e PASSWORD="YOURPASS"` - Configures Jupyter Notebook to require the given password. Should be conbined with `USE_HTTPS` on untrusted networks. +* `-e USE_HTTPS=yes` - Configures Jupyter Notebook to accept encrypted HTTPS connections. If a `pem` file containing a SSL certificate and key is not found in `/home/jovyan/.ipython/profile_default/security/notebook.pem`, the container will generate a self-signed certificate for you. +* `-e GRANT_SUDO=yes` - Gives the `jovyan` user passwordless `sudo` capability. Useful for installing OS packages. **You should only enable `sudo` if you trust the user or if the container is running on an isolated host.** +* `-v /some/host/folder/for/work:/home/jovyan/work` - Host mounts the default working directory on the host to preserve work even when the container is destroyed and recreated (e.g., during an upgrade). +* `-v /some/host/folder/for/server.pem:/home/jovyan/.ipython/profile_default/security/notebook.pem` - Mounts a SSL certificate plus key for `USE_HTTPS`. Useful if you have a real certificate for the domain under which you are running the Notebook server. +* `-e INTERFACE=10.10.10.10` - Configures Jupyter Notebook to listen on the given interface. Defaults to '*', all interfaces, which is appropriate when running using default bridged Docker networking. When using Docker's `--net=host`, you may wish to use this option to specify a particular network interface. +* `-e PORT=8888` - Configures Jupyter Notebook to listen on the given port. Defaults to 8888, which is the port exposed within the Dockerfile for the image. When using Docker's `--net=host`, you may wish to use this option to specify a particular port.