<commit_before># (c) Copyright IBM Corp. 2016.  All Rights Reserved.
# Distributed under the terms of the Modified BSD License.

# Pin to a known release for sanity
FROM jupyter/all-spark-notebook:2d878db5cbff

# Become root to do the apt-gets
USER root

# Install latest version of node & npm
RUN apt-get update && \
    apt-get install --yes curl && \
    curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - && \
    apt-get install --yes nodejs npm && \
    ln -s /usr/bin/nodejs /usr/bin/node && \
    npm install -g bower

# Do the pip installs as the unprivileged notebook user
USER jovyan

# Install dashboard layout and preview within Jupyter Notebook
RUN pip install jupyter_dashboards==0.5.0 && \
    jupyter dashboards install --user --symlink && \
    jupyter dashboards activate

# Install declarative widgets for Jupyter Notebook
RUN pip install jupyter_declarativewidgets==0.5.0 && \
    jupyter declarativewidgets install --user --symlink && \
    jupyter declarativewidgets activate

# Install content management to support dashboard bundler options
RUN pip install jupyter_cms==0.5.0 && \
    jupyter cms install --user --symlink && \
    jupyter cms activate
RUN pip install jupyter_dashboards_bundlers==0.5.0 && \
    jupyter dashboards_bundlers activate

# Install packages needed for demo notebooks (in Python 2 and 3 environments)
RUN pip install \
    pymongo==3.2.1
RUN $CONDA_DIR/envs/python2/bin/pip install \
    requests==2.9.1 \
    pymongo==3.2.1

# Copy sample notebooks into image
USER root
COPY ./samples/ /samples/

# Use custom entrypoint script to copy sample notebooks to notebook directory
# on container start
COPY docker-entrypoint.sh /srv/docker-entrypoint.sh
RUN chmod 755 /srv/docker-entrypoint.sh
ENTRYPOINT ["tini", "--", "/srv/docker-entrypoint.sh"]
CMD ["start-notebook.sh"]

# Stay as jovyan user in the newer docker-stack images
USER jovyan<commit_msg>Bump to latest version of declarative widgets and dashboard bundlers extensions.<commit_after># (c) Copyright IBM Corp. 2016.  All Rights Reserved.
# Distributed under the terms of the Modified BSD License.

# Pin to a known release for sanity
FROM jupyter/all-spark-notebook:2d878db5cbff

# Become root to do the apt-gets
USER root

# Install latest version of node & npm
RUN apt-get update && \
    apt-get install --yes curl && \
    curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - && \
    apt-get install --yes nodejs npm && \
    ln -s /usr/bin/nodejs /usr/bin/node && \
    npm install -g bower

# Do the pip installs as the unprivileged notebook user
USER jovyan

# Install dashboard layout and preview within Jupyter Notebook
RUN pip install jupyter_dashboards==0.5.0 && \
    jupyter dashboards install --user --symlink && \
    jupyter dashboards activate

# Install declarative widgets for Jupyter Notebook
RUN pip install jupyter_declarativewidgets==0.5.1 && \
    jupyter declarativewidgets install --user --symlink && \
    jupyter declarativewidgets activate

# Install content management to support dashboard bundler options
RUN pip install jupyter_cms==0.5.0 && \
    jupyter cms install --user --symlink && \
    jupyter cms activate
RUN pip install jupyter_dashboards_bundlers==0.7.0 && \
    jupyter dashboards_bundlers activate

# Install packages needed for demo notebooks (in Python 2 and 3 environments)
RUN pip install \
    pymongo==3.2.1
RUN $CONDA_DIR/envs/python2/bin/pip install \
    requests==2.9.1 \
    pymongo==3.2.1

# Copy sample notebooks into image
USER root
COPY ./samples/ /samples/

# Use custom entrypoint script to copy sample notebooks to notebook directory
# on container start
COPY docker-entrypoint.sh /srv/docker-entrypoint.sh
RUN chmod 755 /srv/docker-entrypoint.sh
ENTRYPOINT ["tini", "--", "/srv/docker-entrypoint.sh"]
CMD ["start-notebook.sh"]

# Stay as jovyan user in the newer docker-stack images
USER jovyan
{'fraction_non_alphanumeric': 0.09257842387146137, 'fraction_numerical': 0.019892884468247895, 'mean_word_length': 3.5080459770114945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4898759', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1236, 'n_words': 431}