<commit_before>FROM golang:1.6.0
RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y \
    build-essential \
    wget \
    gcc \
    gfortran \
    libreadline-dev \
    perl \
    vim \
    xpdf 

RUN echo 'deb http://cran.rstudio.com/bin/linux/debian jessie-cran3/' >> /etc/apt/sources.list && \
    apt-key adv --keyserver keys.gnupg.net --recv-key 381BA480 && \ 
    apt-get update && \
    apt-get install -y \
        r-base

# WORKDIR /tmp
# RUN wget https://cran.r-project.org/src/base/R-3/R-3.1.0.tar.gz
# RUN tar -xzf R-3.1.0.tar.gz
# WORKDIR /tmp/R-3.1.0
# RUN ./configure -with-x=no
# WORKDIR /tmp/R-3.1.0
# RUN make 
# RUN cp bin/R /usr/bin/R

ADD deps.r /tmp/deps.r
WORKDIR /tmp/
RUN R --vanilla < deps.r

RUN go get github.com/gorilla/mux 
RUN mkdir -p /go/src/github.com/fjukstad

VOLUME /go/src/github.com/fjukstad/kvik 

EXPOSE 80

WORKDIR /go/src/github.com/fjukstad/kvik/r/tools
CMD go run server.go -port=":80" <commit_msg>cleanup<commit_after>FROM golang:1.6.0
RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y \
    build-essential \
    wget \
    gcc \
    gfortran \
    libreadline-dev \
    perl \
    vim \
    libxml2-dev \ 
    xpdf 

RUN echo 'deb http://cran.rstudio.com/bin/linux/debian jessie-cran3/' >> /etc/apt/sources.list && \
    apt-key adv --keyserver keys.gnupg.net --recv-key 381BA480 && \ 
    apt-get update && \
    apt-get install -y \
        r-base

RUN R -e 'install.packages("jsonlite", repos="http://cran.rstudio.org")'

RUN go get github.com/gorilla/mux 
RUN mkdir -p /go/src/github.com/fjukstad

# when the kvik repo is publically available we'll simply do a 
# go get ... to fetch the source code. 
# RUN go get github.com/fjukstad/kvik
VOLUME /go/src/github.com/fjukstad/kvik 

EXPOSE 80

WORKDIR /go/src/github.com/fjukstad/kvik/r/tools
CMD go run server.go -port=":80" 
{'fraction_non_alphanumeric': 0.1502397442727757, 'fraction_numerical': 0.022376132125732553, 'mean_word_length': 2.2102564102564104, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '3679545', 'n_tokens_mistral': 820, 'n_tokens_neox': 768, 'n_words': 171}