<commit_before>FROM python:3.5.2-slim
ADD . /opt/swd6/api

ENV API_PORT=8080
ENV API_HOST=localhost
ENV WORKER_COUNT=4

WORKDIR /opt/swd6/api
RUN apt-get clean \
    && apt-get update \
    && apt-get install -y build-essential libpq-dev git \
    && pip install -e /opt/swd6/api \
    && pip install --upgrade git+https://github.com/jimbobhickville/sqlalchemy-jsonapi.git@sanity#egg=sqlalchemy_jsonapi \
    && pip install --upgrade simplejson \
    && apt-get -y purge build-essential libpq-dev git \
    && apt-get clean

CMD gunicorn -w $WORKER_COUNT -b 0.0.0.0:$API_PORT swd6.api.app:app<commit_msg>Further reduce docker image size<commit_after>FROM python:3.5.2-slim
ADD . /opt/swd6/api

ENV API_PORT=8080
ENV API_HOST=localhost
ENV WORKER_COUNT=4

WORKDIR /opt/swd6/api
RUN apt-get clean \
    && apt-get update \
    && apt-get install -y build-essential libpq-dev libpq5 git \
    && pip install -e /opt/swd6/api \
    && pip install --upgrade git+https://github.com/jimbobhickville/sqlalchemy-jsonapi.git@sanity#egg=sqlalchemy_jsonapi \
    && pip install --upgrade simplejson \
    && apt-get -y purge build-essential libpq-dev git \
    && apt-get autoremove -y \
    && apt-get clean

CMD gunicorn -w $WORKER_COUNT -b 0.0.0.0:$API_PORT swd6.api.app:app
{'fraction_non_alphanumeric': 0.13043478260869565, 'fraction_numerical': 0.02608695652173913, 'mean_word_length': 3.1103896103896105, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1300567', 'n_tokens_mistral': 510, 'n_tokens_neox': 471, 'n_words': 107}