<commit_before># mccahill/r-studio
#
# VERSION 0.88

FROM   ubuntu:14.04
MAINTAINER <NAME> "<EMAIL>"

# get R from a CRAN archive 
RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/"  >>  /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

RUN apt-get update &&   \
    apt-get upgrade -y

# we want OpenBLAS for faster linear algebra as described here: http://brettklamer.com/diversions/statistical/faster-blas-in-r/
RUN apt-get install -y \
   libopenblas-base
RUN apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes \
   r-base \
   r-base-dev

#Utilities
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   vim \
   less \
   net-tools \
   inetutils-ping \
   curl \
   git \
   telnet \
   nmap \
   socat \
   python-software-properties \
   wget \
   sudo \
   libcurl4-openssl-dev \
   libxml2-dev 

RUN apt-get update && \
    apt-get upgrade -y

# we need TeX for the rmarkdown package in RStudio

# TeX 
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   texlive \ 
   texlive-base \ 
   texlive-latex-extra \ 
   texlive-pstricks 

# R-Studio
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   gdebi-core \
   libapparmor1
RUN DEBIAN_FRONTEND=noninteractive wget https://download2.rstudio.org/rstudio-server-0.99.902-amd64.deb
RUN DEBIAN_FRONTEND=noninteractive gdebi -n rstudio-server-0.99.902-amd64.deb
RUN rm rstudio-server-0.99.902-amd64.deb

# update the R packages we will need for knitr
RUN DEBIAN_FRONTEND=noninteractive wget \
   http://archive.linux.duke.edu/cran/src/contrib/knitr_1.14.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/yaml_2.1.13.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/Rcpp_0.12.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/htmltools_0.3.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/caTools_1.17.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/bitops_1.0-6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/digest_0.6.10.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringr_1.1.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/markdown_0.7.7.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/highr_0.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/formatR_1.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/evaluate_0.9.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/mime_0.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringi_1.1.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/magrittr_1.5.tar.gz


RUN DEBIAN_FRONTEND=noninteractive R CMD INSTALL \
   bitops_1.0-6.tar.gz \
   caTools_1.17.1.tar.gz \
   digest_0.6.10.tar.gz \
   Rcpp_0.12.6.tar.gz \
   htmltools_0.3.5.tar.gz \
   yaml_2.1.13.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   mime_0.5.tar.gz \
   stringr_1.1.0.tar.gz \
   highr_0.6.tar.gz \
   formatR_1.4.tar.gz \
   evaluate_0.9.tar.gz \
   markdown_0.7.7.tar.gz \
   knitr_1.14.tar.gz 

RUN rm \
   evaluate_0.9.tar.gz \
   formatR_1.4.tar.gz \
   highr_0.6.tar.gz \
   markdown_0.7.7.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   stringr_1.1.0.tar.gz \
   knitr_1.14.tar.gz \
   yaml_2.1.13.tar.gz \
   Rcpp_0.12.6.tar.gz \
   htmltools_0.3.5.tar.gz \
   caTools_1.17.1.tar.gz \
   bitops_1.0-6.tar.gz \
   digest_0.6.10.tar.gz \
   mime_0.5.tar.gz

# dependency for R XML library
RUN apt-get update && \
    apt-get upgrade -y

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   libxml2 \ 
   libxml2-dev


# R packages we need for devtools - and we need devtools to be able to update the rmarkdown package
RUN DEBIAN_FRONTEND=noninteractive wget \
   http://archive.linux.duke.edu/cran/src/contrib/rstudioapi_0.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/openssl_0.9.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/withr_1.0.2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/brew_1.0-6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringi_1.1.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/magrittr_1.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringr_1.1.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/roxygen2_5.0.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/rversions_1.0.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/git2r_0.15.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/devtools_1.12.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/R6_2.1.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/mime_0.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/httr_1.2.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/RCurl_1.95-4.8.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/Rcpp_0.12.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/BH_1.60.0-2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/xml2_1.0.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/curl_1.2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/jsonlite_1.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/digest_0.6.10.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/downloader_0.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/memoise_1.0.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/plyr_1.8.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/XML_3.98-1.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/whisker_0.3-2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/bitops_1.0-6.tar.gz

RUN DEBIAN_FRONTEND=noninteractive R CMD INSTALL \
   jsonlite_1.0.tar.gz \
   digest_0.6.10.tar.gz \
   memoise_1.0.0.tar.gz \
   whisker_0.3-2.tar.gz \
   bitops_1.0-6.tar.gz \
   RCurl_1.95-4.8.tar.gz \
   Rcpp_0.12.6.tar.gz \
   plyr_1.8.4.tar.gz \
   R6_2.1.3.tar.gz \
   curl_1.2.tar.gz \
   openssl_0.9.4.tar.gz \
   mime_0.5.tar.gz \
   httr_1.2.1.tar.gz \
   rstudioapi_0.6.tar.gz \
   withr_1.0.2.tar.gz \
   brew_1.0-6.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   stringr_1.1.0.tar.gz \
   roxygen2_5.0.1.tar.gz \
   XML_3.98-1.4.tar.gz \
   BH_1.60.0-2.tar.gz \
   xml2_1.0.0.tar.gz \
   rversions_1.0.3.tar.gz \
   git2r_0.15.0.tar.gz \
   devtools_1.12.0.tar.gz \
   downloader_0.4.tar.gz

RUN rm \
   jsonlite_1.0.tar.gz \
   digest_0.6.10.tar.gz \
   memoise_1.0.0.tar.gz \
   whisker_0.3-2.tar.gz \
   bitops_1.0-6.tar.gz \
   RCurl_1.95-4.8.tar.gz \
   Rcpp_0.12.6.tar.gz \
   plyr_1.8.4.tar.gz \
   R6_2.1.3.tar.gz \
   mime_0.5.tar.gz \
   httr_1.2.1.tar.gz \
   rstudioapi_0.6.tar.gz \
   openssl_0.9.4.tar.gz \
   withr_1.0.2.tar.gz \
   brew_1.0-6.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   stringr_1.1.0.tar.gz \
   roxygen2_5.0.1.tar.gz \
   XML_3.98-1.4.tar.gz \
   BH_1.60.0-2.tar.gz \
   xml2_1.0.0.tar.gz \
   curl_1.2.tar.gz \
   rversions_1.0.3.tar.gz \
   git2r_0.15.0.tar.gz \
   devtools_1.12.0.tar.gz \
   downloader_0.4.tar.gz
   

# libraries <NAME> wanted
RUN DEBIAN_FRONTEND=noninteractive wget \
   http://archive.linux.duke.edu/cran/src/contrib/lubridate_1.5.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/ggplot2_2.1.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/RColorBrewer_1.1-2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/dichromat_2.0-0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/colorspace_1.2-6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/munsell_0.4.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/labeling_0.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/scales_0.4.0.tar.gz \<commit_msg>update libraries<commit_after># mccahill/r-studio
#
# VERSION 0.88

FROM   ubuntu:14.04
MAINTAINER <NAME> "<EMAIL>"

# get R from a CRAN archive 
RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/"  >>  /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

RUN apt-get update &&   \
    apt-get upgrade -y

# we want OpenBLAS for faster linear algebra as described here: http://brettklamer.com/diversions/statistical/faster-blas-in-r/
RUN apt-get install -y \
   libopenblas-base
RUN apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes \
   r-base \
   r-base-dev

#Utilities
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   vim \
   less \
   net-tools \
   inetutils-ping \
   curl \
   git \
   telnet \
   nmap \
   socat \
   python-software-properties \
   wget \
   sudo \
   libcurl4-openssl-dev \
   libxml2-dev 

RUN apt-get update && \
    apt-get upgrade -y

# we need TeX for the rmarkdown package in RStudio

# TeX 
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   texlive \ 
   texlive-base \ 
   texlive-latex-extra \ 
   texlive-pstricks 

# R-Studio
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   gdebi-core \
   libapparmor1
RUN DEBIAN_FRONTEND=noninteractive wget https://download2.rstudio.org/rstudio-server-0.99.902-amd64.deb
RUN DEBIAN_FRONTEND=noninteractive gdebi -n rstudio-server-0.99.902-amd64.deb
RUN rm rstudio-server-0.99.902-amd64.deb

# update the R packages we will need for knitr
RUN DEBIAN_FRONTEND=noninteractive wget \
   http://archive.linux.duke.edu/cran/src/contrib/knitr_1.14.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/yaml_2.1.13.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/Rcpp_0.12.7.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/htmltools_0.3.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/caTools_1.17.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/bitops_1.0-6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/digest_0.6.10.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringr_1.1.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/markdown_0.7.7.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/highr_0.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/formatR_1.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/evaluate_0.9.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/mime_0.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringi_1.1.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/magrittr_1.5.tar.gz


RUN DEBIAN_FRONTEND=noninteractive R CMD INSTALL \
   bitops_1.0-6.tar.gz \
   caTools_1.17.1.tar.gz \
   digest_0.6.10.tar.gz \
   Rcpp_0.12.7.tar.gz \
   htmltools_0.3.5.tar.gz \
   yaml_2.1.13.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   mime_0.5.tar.gz \
   stringr_1.1.0.tar.gz \
   highr_0.6.tar.gz \
   formatR_1.4.tar.gz \
   evaluate_0.9.tar.gz \
   markdown_0.7.7.tar.gz \
   knitr_1.14.tar.gz 

RUN rm \
   evaluate_0.9.tar.gz \
   formatR_1.4.tar.gz \
   highr_0.6.tar.gz \
   markdown_0.7.7.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   stringr_1.1.0.tar.gz \
   knitr_1.14.tar.gz \
   yaml_2.1.13.tar.gz \
   Rcpp_0.12.7.tar.gz \
   htmltools_0.3.5.tar.gz \
   caTools_1.17.1.tar.gz \
   bitops_1.0-6.tar.gz \
   digest_0.6.10.tar.gz \
   mime_0.5.tar.gz

# dependency for R XML library
RUN apt-get update && \
    apt-get upgrade -y

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
   libxml2 \ 
   libxml2-dev


# R packages we need for devtools - and we need devtools to be able to update the rmarkdown package
RUN DEBIAN_FRONTEND=noninteractive wget \
   http://archive.linux.duke.edu/cran/src/contrib/rstudioapi_0.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/openssl_0.9.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/withr_1.0.2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/brew_1.0-6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringi_1.1.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/magrittr_1.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/stringr_1.1.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/roxygen2_5.0.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/rversions_1.0.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/git2r_0.15.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/devtools_1.12.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/R6_2.1.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/mime_0.5.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/httr_1.2.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/RCurl_1.95-4.8.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/Rcpp_0.12.7.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/BH_1.60.0-2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/xml2_1.0.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/curl_2.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/jsonlite_1.1.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/digest_0.6.10.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/downloader_0.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/memoise_1.0.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/plyr_1.8.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/XML_3.98-1.4.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/whisker_0.3-2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/bitops_1.0-6.tar.gz

RUN DEBIAN_FRONTEND=noninteractive R CMD INSTALL \
   jsonlite_1.1.tar.gz \
   digest_0.6.10.tar.gz \
   memoise_1.0.0.tar.gz \
   whisker_0.3-2.tar.gz \
   bitops_1.0-6.tar.gz \
   RCurl_1.95-4.8.tar.gz \
   Rcpp_0.12.7.tar.gz \
   plyr_1.8.4.tar.gz \
   R6_2.1.3.tar.gz \
   curl_2.0.tar.gz \
   openssl_0.9.4.tar.gz \
   mime_0.5.tar.gz \
   httr_1.2.1.tar.gz \
   rstudioapi_0.6.tar.gz \
   withr_1.0.2.tar.gz \
   brew_1.0-6.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   stringr_1.1.0.tar.gz \
   roxygen2_5.0.1.tar.gz \
   XML_3.98-1.4.tar.gz \
   BH_1.60.0-2.tar.gz \
   xml2_1.0.0.tar.gz \
   rversions_1.0.3.tar.gz \
   git2r_0.15.0.tar.gz \
   devtools_1.12.0.tar.gz \
   downloader_0.4.tar.gz

RUN rm \
   jsonlite_1.1.tar.gz \
   digest_0.6.10.tar.gz \
   memoise_1.0.0.tar.gz \
   whisker_0.3-2.tar.gz \
   bitops_1.0-6.tar.gz \
   RCurl_1.95-4.8.tar.gz \
   Rcpp_0.12.7.tar.gz \
   plyr_1.8.4.tar.gz \
   R6_2.1.3.tar.gz \
   mime_0.5.tar.gz \
   httr_1.2.1.tar.gz \
   rstudioapi_0.6.tar.gz \
   openssl_0.9.4.tar.gz \
   withr_1.0.2.tar.gz \
   brew_1.0-6.tar.gz \
   stringi_1.1.1.tar.gz \
   magrittr_1.5.tar.gz \
   stringr_1.1.0.tar.gz \
   roxygen2_5.0.1.tar.gz \
   XML_3.98-1.4.tar.gz \
   BH_1.60.0-2.tar.gz \
   xml2_1.0.0.tar.gz \
   curl_2.0.tar.gz \
   rversions_1.0.3.tar.gz \
   git2r_0.15.0.tar.gz \
   devtools_1.12.0.tar.gz \
   downloader_0.4.tar.gz
   

# libraries <NAME> wanted
RUN DEBIAN_FRONTEND=noninteractive wget \
   http://archive.linux.duke.edu/cran/src/contrib/lubridate_1.5.6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/ggplot2_2.1.0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/RColorBrewer_1.1-2.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/dichromat_2.0-0.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/colorspace_1.2-6.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/munsell_0.4.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/labeling_0.3.tar.gz \
   http://archive.linux.duke.edu/cran/src/contrib/scales_0.4.0.tar.gz \
{'fraction_non_alphanumeric': 0.16992625841615902, 'fraction_numerical': 0.05950625200384739, 'mean_word_length': 2.4458683163941672, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '280409', 'n_tokens_mistral': 7470, 'n_tokens_neox': 7260, 'n_words': 665}