2015-05-21 13:02:38 +08:00
|
|
|
# Installs Jupyter Notebook and IPython kernel from the current branch
|
|
|
|
# Another Docker container should inherit with `FROM jupyter/notebook`
|
|
|
|
# to run actual services.
|
2014-09-13 01:38:36 +08:00
|
|
|
|
2014-09-25 10:49:27 +08:00
|
|
|
FROM ubuntu:14.04
|
2014-09-13 00:46:41 +08:00
|
|
|
|
2015-05-21 13:02:38 +08:00
|
|
|
MAINTAINER Project Jupyter <jupyter@googlegroups.com>
|
2014-09-13 00:46:41 +08:00
|
|
|
|
2014-09-25 10:49:27 +08:00
|
|
|
# Not essential, but wise to set the lang
|
|
|
|
# Note: Users with other languages should set this in their derivative image
|
|
|
|
ENV LANGUAGE en_US.UTF-8
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2015-10-06 02:36:54 +08:00
|
|
|
# Python binary and source dependencies
|
2015-10-02 07:12:50 +08:00
|
|
|
RUN apt-get update -qq \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
language-pack-en \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libsqlite3-dev \
|
|
|
|
libzmq3-dev \
|
|
|
|
pandoc \
|
|
|
|
python \
|
|
|
|
python-dev \
|
|
|
|
python3-dev \
|
|
|
|
sqlite3 \
|
|
|
|
zlib1g-dev \
|
2015-10-02 07:45:57 +08:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
\
|
|
|
|
`# Install the recent pip release` \
|
|
|
|
&& curl -O https://bootstrap.pypa.io/get-pip.py \
|
2015-10-01 20:38:41 +08:00
|
|
|
&& python2 get-pip.py \
|
|
|
|
&& python3 get-pip.py \
|
2015-10-02 07:45:57 +08:00
|
|
|
&& rm get-pip.py \
|
|
|
|
\
|
|
|
|
&& pip2 --no-cache-dir install ipykernel \
|
|
|
|
&& pip3 --no-cache-dir install ipykernel
|
2015-05-21 13:02:38 +08:00
|
|
|
|
2015-10-06 03:08:21 +08:00
|
|
|
ADD . /usr/src/jupyter-notebook
|
2014-09-25 06:32:15 +08:00
|
|
|
|
2015-10-06 03:14:57 +08:00
|
|
|
RUN ln -s /usr/src/jupyter-notebook/scripts/lxc-launcher.sh /launch.sh \
|
|
|
|
\
|
|
|
|
&& BUILD_DEPS="nodejs-legacy npm" \
|
2015-10-02 08:18:23 +08:00
|
|
|
&& apt-get update -qq \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends $BUILD_DEPS \
|
|
|
|
\
|
2015-10-06 03:08:21 +08:00
|
|
|
&& pip3 install --no-cache-dir --pre -e /usr/src/jupyter-notebook \
|
2015-10-02 08:18:23 +08:00
|
|
|
\
|
|
|
|
&& apt-get purge -y --auto-remove \
|
|
|
|
-o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $BUILD_DEPS \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
\
|
2015-10-02 07:45:57 +08:00
|
|
|
&& python2 -m ipykernel.kernelspec \
|
2015-10-06 03:26:54 +08:00
|
|
|
&& python3 -m ipykernel.kernelspec \
|
|
|
|
\
|
|
|
|
&& pip2 install --no-cache-dir mock nose requests testpath \
|
|
|
|
&& pip3 install --no-cache-dir nose requests testpath \
|
|
|
|
&& iptest2 && iptest3 \
|
2015-10-06 06:09:42 +08:00
|
|
|
&& pip2 uninstall -y funcsigs mock nose pbr requests six testpath \
|
|
|
|
&& pip3 uninstall -y nose requests testpath
|
2015-10-02 05:24:18 +08:00
|
|
|
|
2015-10-06 03:16:00 +08:00
|
|
|
VOLUME /notebooks
|
|
|
|
WORKDIR /notebooks
|
|
|
|
|
2015-10-06 03:14:57 +08:00
|
|
|
ENTRYPOINT /launch.sh
|
|
|
|
|
2015-10-02 05:24:18 +08:00
|
|
|
EXPOSE 8888
|