<commit_before>FROM danielak/latex-trusty:latest

# Global Variables
# Making one change to RBRANCH toggles this from pre-release (R-devel) to base (current R)
ENV RBRANCH base/
ENV RVERSION R-latest
ENV CRANURL https://cran.rstudio.com/src/

# Add R Repository for CRAN packages
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

# Try replacing the standard ubuntu archive with a faster mirror
RUN sed -i.bak 's/archive.ubuntu.com/mirrors.rit.edu/' /etc/apt/sources.list

# Install Pandoc
RUN cabal update && cabal install pandoc
RUN cabal update && cabal install pandoc-citeproc

# Link Pandoc Binaries
RUN ln -s /root/.cabal/bin/pandoc /usr/local/bin/pandoc
RUN ln -s /root/.cabal/bin/pandoc-citeproc /usr/local/bin/pandoc-citeproc

# Get the system ready to build R from source
RUN apt-get update && apt-get build-dep --assume-yes \
    r-base-core \
    r-cran-rgl

# Build and install R from source
RUN wget "$CRANURL$RBRANCH$RVERSION.tar.gz" && \
    mkdir /$RVERSION && \
    tar --strip-components 1 -zxvf $RVERSION.tar.gz  -C /$RVERSION && \
    cd /$RVERSION && \
    ./configure --enable-R-shlib && \
    make && \
    make install

# Install R packages
COPY r-packages.R /tmp/
RUN R --vanilla -f /tmp/r-packages.R

# Copy R script to render a manuscript
RUN mkdir -p /render
COPY render_manuscript.R /render/

# Set up a working directory
RUN mkdir -p /source
WORKDIR /source
ENTRYPOINT [ "R", "--vanilla", "-f", "/render/render_manuscript.R", "--args" ]<commit_msg>Move pandoc logic to pandoc image<commit_after>FROM danielak/pandoc:latest

# Global Variables
# Making one change to RBRANCH toggles this from pre-release (R-devel) to base (current R)
ENV RBRANCH base/
ENV RVERSION R-latest
ENV CRANURL https://cran.rstudio.com/src/

# Add R Repository for CRAN packages
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

# install some basic stuff R depends upon
RUN apt-get update && apt-get install --assume-yes \
    apache2 \
    ca-certificates \
    ccache \
    gdebi \
    git \
    libcurl4-openssl-dev \
    libmysqlclient-dev \
    libpq-dev \
    libssl-dev \
    libx11-dev \
    libxml2-dev \
    lmodern \
    mysql-client \
    wget

# Get Dependencies to build R from source
RUN apt-get update && apt-get build-dep --assume-yes \
    r-base-core \
    r-cran-rgl

# Build R from source
RUN wget "$CRANURL$RBRANCH$RVERSION.tar.gz" && \
    mkdir /$RVERSION && \
    tar --strip-components 1 -zxvf $RVERSION.tar.gz  -C /$RVERSION && \
    cd /$RVERSION && \
    ./configure --enable-R-shlib && \
    make && \
    make install

# Install R packages
COPY r-packages.R /tmp/
RUN R --vanilla -f /tmp/r-packages.R

# Copy R script to render a manuscript
RUN mkdir -p /render
COPY render_manuscript.R /render/

# Set up a working directory
RUN mkdir -p /source
WORKDIR /source
ENTRYPOINT [ "R", "--vanilla", "-f", "/render/render_manuscript.R", "--args" ]
{'fraction_non_alphanumeric': 0.12084902430674427, 'fraction_numerical': 0.005135227661759671, 'mean_word_length': 2.85997357992074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5055590', 'n_tokens_mistral': 1058, 'n_tokens_neox': 1026, 'n_words': 318}