<commit_before>FROM pl31/debian:stretch
MAINTAINER <NAME> <<EMAIL>>

# install services
RUN apt-get -y update && \
    apt-get -y upgrade && \
    apt-get -y install \
        python3-pip \
        jupyter-notebook jupyter-client jupyter-core \
        jupyter-nbconvert jupyter-nbformat \
        jupyter-nbextension-jupyter-js-widgets python3-ipywidgets

# bad enough debian notebook (4.2.3) is somehow broken or incompatible
RUN pip3 install --no-cache-dir "notebook>4.3,<5"

# install pgcontents and run it once to test dependencies
RUN apt-get -y install python3-requests python3-alembic python3-psycopg2 python3-click \
    tox python3-nose && \
    pip3 install --no-cache-dir pgcontents && \
    pgcontents --help

# runtime configuration
CMD jupyter notebook --no-browser --no-mathjax --ip=* --port=8888

# expose ports
EXPOSE 8888<commit_msg>Use dedicated user for jupyter<commit_after>FROM pl31/debian:stretch
MAINTAINER <NAME> <<EMAIL>>

# install services
RUN apt-get -y update && \
    apt-get -y upgrade && \
    apt-get -y install \
        python3-pip \
        jupyter-notebook jupyter-client jupyter-core \
        jupyter-nbconvert jupyter-nbformat \
        jupyter-nbextension-jupyter-js-widgets python3-ipywidgets

# bad enough debian notebook (4.2.3) is somehow broken or incompatible
RUN pip3 install --no-cache-dir "notebook>4.3,<5"

# add user jupyter to run jupyter
RUN useradd --create-home jupyter

# install pgcontents and run it once to test dependencies
RUN apt-get -y install python3-requests python3-alembic python3-psycopg2 python3-click \
    tox python3-nose && \
    pip3 install --no-cache-dir pgcontents && \
    pgcontents --help

# runtime configuration
CMD runuser -l jupyter -c \
      'jupyter notebook --no-browser --no-mathjax --ip=* --port=8888'

# expose ports
EXPOSE 8888
{'fraction_non_alphanumeric': 0.10373216245883644, 'fraction_numerical': 0.02854006586169045, 'mean_word_length': 3.0331858407079646, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '4141249', 'n_tokens_mistral': 654, 'n_tokens_neox': 623, 'n_words': 173}