<commit_before>FROM python:2.7.9

# you will need need these docker images too:
#  - tpires/neo4j
#  - postgres
# consult README.md for more information

RUN echo 'deb http://httpredir.debian.org/debian jessie non-free' > /etc/apt/sources.list.d/debian-non-free.list \
    && export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get install -y \
    mysql-client libmysqlclient-dev unrar \
    gcc \
    npm \
    git \
    libz-dev libjpeg-dev libfreetype6-dev python-dev \
    --no-install-recommends && rm -rf /var/lib/apt/lists/*
    #postgresql-client libpq-dev \
    #sqlite3 \

#RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y autoremove
    
RUN mkdir -p /srv/tools/investigative-dashboard-2
WORKDIR /srv/tools/investigative-dashboard-2/

# python setup
RUN pip install --upgrade pip
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt

# bower setup
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN npm install -g bower
# these are volume-mounted in development environments
COPY . /srv/tools/investigative-dashboard-2/
RUN cd /srv/tools/investigative-dashboard-2/ && find ./ -iname '*.pyc' -exec rm -rf '{}' \;

# this can be volume-mounted
RUN mkdir -p /var/log/id2/

VOLUME ["/var/log/id2/"]

EXPOSE 8000
#CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]<commit_msg>making non-root work for production<commit_after>FROM python:2.7.9

# you will need need these docker images too:
#  - tpires/neo4j
#  - postgres
# consult README.md for more information

RUN echo 'deb http://httpredir.debian.org/debian jessie non-free' > /etc/apt/sources.list.d/debian-non-free.list \
    && export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get install -y \
    mysql-client libmysqlclient-dev unrar \
    gcc \
    npm \
    git \
    libz-dev libjpeg-dev libfreetype6-dev python-dev \
    --no-install-recommends && rm -rf /var/lib/apt/lists/*
    #postgresql-client libpq-dev \
    #sqlite3 \

#RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y autoremove
    
RUN mkdir -p /srv/tools/investigative-dashboard-2
WORKDIR /srv/tools/investigative-dashboard-2/

# python setup
RUN pip install --upgrade pip
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt

# bower setup
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN npm install -g bower
# these are volume-mounted in development environments
COPY . /srv/tools/investigative-dashboard-2/
RUN chmod -R a+rX /srv/tools/investigative-dashboard-2/
RUN cd /srv/tools/investigative-dashboard-2/ && find ./ -iname '*.pyc' -exec rm -rf '{}' \;

# this can be volume-mounted
RUN mkdir -p /var/log/id2/

VOLUME ["/var/log/id2/"]

EXPOSE 8000
#CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
{'fraction_non_alphanumeric': 0.13708563535911603, 'fraction_numerical': 0.01691988950276243, 'mean_word_length': 3.174351585014409, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1907936', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1049, 'n_words': 266}