<commit_before>FROM ubuntu:16.04

RUN apt-get update && \
      apt-get install -y \
        curl \
        docker

RUN echo "deb http://deb.nodesource.com/node_6.x xenial main" > /etc/apt/sources.list.d/nodesource.list
RUN echo "deb-src http://deb.nodesource.com/node_6.x xenial main" >> /etc/apt/sources.list.d/nodesource.list
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -

RUN apt-get update && \
      apt-get install -y \
        nodejs \
        libsqlite3-dev

RUN npm install -g yarn

WORKDIR /www/

COPY . /www/

RUN rm -r node_modules

# Not sure why we have to tell it to install these packages separately, but
# they break if you don't
# RUN yarn add sqlite3 mapnik
RUN yarn<commit_msg>Added dir check so build doesn't fail when no node_modules directory has been created yet.<commit_after>FROM ubuntu:16.04

RUN apt-get update && \
      apt-get install -y \
        curl \
        docker

RUN echo "deb http://deb.nodesource.com/node_6.x xenial main" > /etc/apt/sources.list.d/nodesource.list
RUN echo "deb-src http://deb.nodesource.com/node_6.x xenial main" >> /etc/apt/sources.list.d/nodesource.list
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -

RUN apt-get update && \
      apt-get install -y \
        nodejs \
        libsqlite3-dev

RUN npm install -g yarn

WORKDIR /www/

COPY . /www/

RUN if [ -d node_modules ]; then rm -r node_modules; fi

# Not sure why we have to tell it to install these packages separately, but
# they break if you don't
# RUN yarn add sqlite3 mapnik
RUN yarn
{'fraction_non_alphanumeric': 0.10977157360406091, 'fraction_numerical': 0.01015228426395939, 'mean_word_length': 2.667441860465116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '1935794', 'n_tokens_mistral': 572, 'n_tokens_neox': 530, 'n_words': 172}