<commit_before>FROM ubuntu:14.04

MAINTAINER <NAME> <<EMAIL>>

RUN apt-get update && apt-get install -y \
    apache2 \
    git \
    libapache2-mod-wsgi \
    libfreetype6 \
    libfreetype6-dev \
    libjpeg-turbo8 \ 
    libjpeg-turbo8-dev \
    liblcms2-2 \
    liblcms2-dev \
    liblcms-utils \
    libtiff5-dev \
    libwebp-dev \
    python-dev \
    python-pip \
    python-setuptools \
    zlib1g-dev 
    
RUN pip install \
    boto \
    configobj \
    mock \
    Pillow \
    requests \
    responses \
    werkzeug

# have to do this to get rid of "ImportError: No module named _winreg" error for six.py
RUN pip install --upgrade six

# install Loris
WORKDIR /opt
RUN git clone https://github.com/barbarahui/loris.git
WORKDIR /opt/loris
RUN git checkout ucldc 
RUN useradd -d /var/www/loris2 -s /sbin/false loris

# make image directories
RUN mkdir /usr/local/share/images
RUN mkdir /usr/local/share/images/loris
RUN chown loris:loris /usr/local/share/images
RUN chown loris:loris /usr/local/share/images/loris

# loris/setup.py should be doing this - not sure why it's broken
RUN cp bin/Linux/x86_64/kdu_expand /usr/local/bin/ 
RUN cp lib/Linux/x86_64/libkdu_v74R.so /usr/lib/

RUN python /opt/loris/setup.py install

# set up apache
RUN a2enmod headers expires
COPY apache-config.txt /etc/apache2/sites-enabled/000-default.conf

# cache maintenance - need to set up a cron job

EXPOSE 80 <commit_msg>Add CMD to start apache when running Dockerfile.<commit_after>FROM ubuntu:14.04

MAINTAINER <NAME> <<EMAIL>>

RUN apt-get update && apt-get install -y \
    apache2 \
    git \
    libapache2-mod-wsgi \
    libfreetype6 \
    libfreetype6-dev \
    libjpeg-turbo8 \ 
    libjpeg-turbo8-dev \
    liblcms2-2 \
    liblcms2-dev \
    liblcms-utils \
    libtiff5-dev \
    libwebp-dev \
    python-dev \
    python-pip \
    python-setuptools \
    zlib1g-dev 
    
RUN pip install \
    boto \
    configobj \
    mock \
    Pillow \
    requests \
    responses \
    werkzeug

# have to do this to get rid of "ImportError: No module named _winreg" error for six.py
RUN pip install --upgrade six

# install Loris
WORKDIR /opt
RUN git clone https://github.com/barbarahui/loris.git
WORKDIR /opt/loris
RUN git checkout ucldc 
RUN useradd -d /var/www/loris2 -s /sbin/false loris

# make image directories
RUN mkdir /usr/local/share/images
RUN mkdir /usr/local/share/images/loris
RUN chown loris:loris /usr/local/share/images
RUN chown loris:loris /usr/local/share/images/loris

# loris/setup.py should be doing this - not sure why it's broken
RUN cp bin/Linux/x86_64/kdu_expand /usr/local/bin/ 
RUN cp lib/Linux/x86_64/libkdu_v74R.so /usr/lib/

RUN python /opt/loris/setup.py install

# set up apache
RUN a2enmod headers expires
COPY apache-config.txt /etc/apache2/sites-enabled/000-default.conf

# cache maintenance - need to set up a cron job

EXPOSE 80 

CMD ["/usr/sbin/apachectl", "-D", "FOREGROUND"]
{'fraction_non_alphanumeric': 0.09766963673749143, 'fraction_numerical': 0.022618231665524333, 'mean_word_length': 2.6396508728179553, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4286976', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1082, 'n_words': 289}