<commit_before>FROM python:3.7
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get install -y libpq-dev supervisor curl vim
RUN useradd -m openslides

## BUILD JS STUFF
RUN wget https://nodejs.org/dist/v10.5.0/node-v10.5.0-linux-x64.tar.xz -P /tmp && \
  cd /tmp && tar xfvJ node-v10.5.0-linux-x64.tar.xz && \
  ln -sf /tmp/node-v10.5.0-linux-x64/bin/node /usr/bin/node
RUN mkdir /app
WORKDIR /app
COPY . /app
RUN chown -R openslides /app
USER openslides
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
RUN $HOME/.yarn/bin/yarn --non-interactive
RUN node_modules/.bin/gulp --production

# INSTALL PYTHON DEPENDENCIES
USER root
RUN pip install .[big_mode]

## Clean up
RUN apt-get remove -y python3-pip wget curl
RUN rm -rf /var/lib/apt/lists/* && \
  rm -fr /app/bower_components && \
  rm -fr /app/node_modules

RUN mkdir /data && chown openslides /data
USER openslides
EXPOSE 8000
VOLUME /supervisord.conf
VOLUME /data<commit_msg>use 3.7-slim instead of 3.7 (#17)<commit_after>FROM python:3.7-slim
RUN apt-get -y update && \
  apt-get -y upgrade && \
  apt-get install -y libpq-dev supervisor curl wget xz-utils bzip2 git gcc
RUN useradd -m openslides

## BUILD JS STUFF
RUN wget https://nodejs.org/dist/v10.5.0/node-v10.5.0-linux-x64.tar.xz -P /tmp && \
  cd /tmp && tar xfvJ node-v10.5.0-linux-x64.tar.xz && \
  ln -sf /tmp/node-v10.5.0-linux-x64/bin/node /usr/bin/node
RUN mkdir /app
WORKDIR /app
COPY . /app
RUN chown -R openslides /app
USER openslides
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
RUN $HOME/.yarn/bin/yarn --non-interactive
RUN node_modules/.bin/gulp --production

# INSTALL PYTHON DEPENDENCIES
USER root
RUN pip install .[big_mode]

## Clean up
RUN apt-get remove -y python3-pip wget curl
RUN rm -rf /var/lib/apt/lists/* && \
  rm -fr /app/bower_components && \
  rm -fr /app/node_modules

RUN mkdir /data && chown openslides /data
USER openslides
EXPOSE 8000
VOLUME /supervisord.conf
VOLUME /data
{'fraction_non_alphanumeric': 0.13814432989690723, 'fraction_numerical': 0.03350515463917526, 'mean_word_length': 3.002061855670103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '6023383', 'n_tokens_mistral': 831, 'n_tokens_neox': 786, 'n_words': 219}