<commit_before>FROM java:8
MAINTAINER <EMAIL>, <EMAIL>

ENV GRAILS_VERSION 3.1.6
ENV OSM_VERSION 3.4.8-build293
ENV OSM_HOME /osm
ENV OSM_CONFIG_HOME /home/osm/.grails
ENV JAVA_OPTS "-server -Dgrails.env=prod -Dfile.encoding=UTF-8"

# Install Grails
WORKDIR /usr/lib/jvm
RUN wget https://github.com/grails/grails-core/releases/download/v$GRAILS_VERSION/grails-$GRAILS_VERSION.zip && \
    unzip grails-$GRAILS_VERSION.zip && \
    rm -rf grails-$GRAILS_VERSION.zip && \
    ln -s grails-$GRAILS_VERSION grails

# Setup Grails path.
ENV GRAILS_HOME /usr/lib/jvm/grails
ENV PATH $GRAILS_HOME/bin:$PATH

# get OSM-sources
RUN mkdir -p $OSM_HOME
WORKDIR /osm
#RUN wget https://github.com/IteraSpeed/OpenSpeedMonitor/archive/$OSM_VERSION.zip && \
#    unzip $OSM_VERSION.zip -d /osm && \
#    mv OpenSpeedMonitor-$OSM_VERSION/* . && \
#    rm -rf $OSM_VERSION.zip OpenSpeedMonitor-$OSM_VERSION
RUN wget https://github.com/IteraSpeed/OpenSpeedMonitor/archive/feature/detailAnalysis.zip && \
    unzip detailAnalysis.zip -d $OSM_HOME && \
    rm -rf detailAnalysis.zip

# build OSM-jar
WORKDIR $OSM_HOME/OpenSpeedMonitor-feature-detailAnalysis
RUN ./gradlew assemble && \
    mv ./build/libs/*.war $OSM_HOME/OpenSpeedMonitor.war
WORKDIR $OSM_HOME
RUN rm -r $OSM_HOME/OpenSpeedMonitor-feature-detailAnalysis /root/.gradle

# add osm config file
RUN useradd -ms /bin/bash osm
RUN mkdir -p $OSM_HOME/logs && \
    chmod 777 -R $OSM_HOME/logs
ADD templates/osm-config.yml $OSM_CONFIG_HOME/OpenSpeedMonitor-config.yml
RUN mkdir -p $OSM_HOME/logs && \
    chown osm:osm -R $OSM_HOME $OSM_CONFIG_HOME<commit_msg>[docker] remove grails. it's not necessary in this image<commit_after>FROM java:8
MAINTAINER <EMAIL>, <EMAIL>

ENV OSM_VERSION 3.4.8-build293
ENV OSM_HOME /osm
ENV OSM_CONFIG_HOME /home/osm/.grails
ENV JAVA_OPTS "-server -Dgrails.env=prod -Dfile.encoding=UTF-8"

# get OSM-sources
RUN mkdir -p $OSM_HOME
WORKDIR /osm
#RUN wget https://github.com/IteraSpeed/OpenSpeedMonitor/archive/$OSM_VERSION.zip && \
#    unzip $OSM_VERSION.zip -d /osm && \
#    mv OpenSpeedMonitor-$OSM_VERSION/* . && \
#    rm -rf $OSM_VERSION.zip OpenSpeedMonitor-$OSM_VERSION
RUN wget https://github.com/IteraSpeed/OpenSpeedMonitor/archive/feature/detailAnalysis.zip && \
    unzip detailAnalysis.zip -d $OSM_HOME && \
    rm -rf detailAnalysis.zip

# build OSM-jar
WORKDIR $OSM_HOME/OpenSpeedMonitor-feature-detailAnalysis
RUN ./gradlew assemble && \
    mv ./build/libs/*.war $OSM_HOME/OpenSpeedMonitor.war
WORKDIR $OSM_HOME
RUN rm -r $OSM_HOME/OpenSpeedMonitor-feature-detailAnalysis /root/.gradle

# add osm config file
RUN useradd -ms /bin/bash osm
RUN mkdir -p $OSM_HOME/logs && \
    chmod 777 -R $OSM_HOME/logs
ADD templates/osm-config.yml $OSM_CONFIG_HOME/OpenSpeedMonitor-config.yml
RUN mkdir -p $OSM_HOME/logs && \
    chown osm:osm -R $OSM_HOME $OSM_CONFIG_HOME
{'fraction_non_alphanumeric': 0.12368236120871398, 'fraction_numerical': 0.008784258608573436, 'mean_word_length': 3.934142114384749, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '760058', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1074, 'n_words': 227}