Skip to content

Commit

Permalink
Merge pull request #4 from saagie/R
Browse files Browse the repository at this point in the history
(job) add R 3.4.4/3.5.3
  • Loading branch information
PierreLeresteux authored Dec 27, 2019
2 parents 5b755d8 + 1afd729 commit bb7eb05
Show file tree
Hide file tree
Showing 31 changed files with 814 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildOnlyModified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: List all releases
uses: actions/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{secrets.GITHUB_SECRET}}
script: |
const result = await github.repos.listReleases(context.repo);
result.data
Expand Down
171 changes: 171 additions & 0 deletions certified/job/R/3.4.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
FROM rocker/tidyverse:3.4.4

USER root


# Install system libraries required by R packages
RUN apt-get -y update && apt-get install -y libcups2 libcups2-dev openjdk-8-jdk systemd \
unixodbc-dev libbz2-dev libgsl-dev odbcinst libx11-dev mesa-common-dev libglu1-mesa-dev \
gdal-bin proj-bin libgdal-dev libproj-dev libudunits2-dev libtcl8.6 libtk8.6 libgtk2.0-dev && \
apt-get clean

# Install Impala ODBC dependency
RUN cd /tmp && \
wget --no-verbose https://downloads.cloudera.com/connectors/impala_odbc_2.5.41.1029/Debian/clouderaimpalaodbc_2.5.41.1029-2_amd64.deb && \
dpkg -i clouderaimpalaodbc_2.5.41.1029-2_amd64.deb && \
odbcinst -i -d -f /opt/cloudera/impalaodbc/Setup/odbcinst.ini

# Install Saagie's RStudio Addin
RUN R -e "install.packages('devtools')" && \
R -e "devtools::install_github('saagie/rstudio-saagie-addin')"

# Install R packages
RUN R CMD javareconf && R -e "install.packages('rJava')" && \
R -e "install.packages('odbc')" && \
R -e "install.packages('RJDBC')" && \
R -e "install.packages('implyr')" && \
R -e "install.packages('futile.logger')" && \
R -e "install.packages('h2o')" && \
R -e "install.packages('caret')" && \
R -e "install.packages('ROSE')" && \
R -e "install.packages('caretEnsemble')" && \
R -e "install.packages('randomForest')" && \
R -e "install.packages('pROC')" && \
R -e "install.packages('rsparkling')" && \
R -e "install.packages('xts')" && \
R -e "install.packages('dygraphs')" && \
R -e "install.packages('forecast')" && \
R -e "install.packages('mclust')" && \
R -e "install.packages('factoextra')" && \
R -e "install.packages('dbscan')" && \
R -e "install.packages('dtw')" && \
R -e "install.packages('ROCR')" && \
R -e "install.packages('Rtsne')" && \
R -e "install.packages('corrplot')" && \
R -e "install.packages('dummies')" && \
R -e "install.packages('xgboost')" && \
R -e "install.packages('e1071')" && \
R -e "install.packages('DescTools')" && \
R -e "install.packages('packrat')" && \
R -e "install.packages('tm')" && \
R -e "install.packages('RTextTools')" && \
R -e "install.packages('networkD3')" && \
R -e "install.packages('sqldf')" && \
R -e "install.packages('syuzhet')" && \
R -e "install.packages('TSclust')" && \
R -e "install.packages('arules')" && \
R -e "install.packages('arulesSequences')" && \
R -e "install.packages('recommenderlab')" && \
R -e "install.packages('AUC')" && \
R -e "install.packages('kohonen')" && \
R -e "install.packages('topicmodels')" && \
R -e "install.packages('argparse')" && \
R -e "install.packages('lsa')" && \
R -e "install.packages('d3heatmap')" && \
R -e "install.packages('pvclust')" && \
R -e "install.packages('trend')" && \
R -e "install.packages('breakpoint')" && \
R -e "install.packages('changepoint')" && \
R -e "install.packages('mvoutlier')" && \
R -e "install.packages('shinydashboard')" && \
R -e "install.packages('FNN')" && \
R -e "install.packages('plotly')" && \
R -e "install.packages('RMySQL')" && \
R -e "install.packages('DescTools')" && \
R -e "install.packages('doParallel')" && \
R -e "install.packages('ff')" && \
R -e "install.packages('ffbase')" && \
R -e "install.packages('jsonlite')" && \
R -e "install.packages('forecast')" && \
R -e "install.packages('tseries')" && \
R -e "install.packages('trend')" && \
R -e "install.packages('rvest')" && \
R -e "install.packages('curl')" && \
R -e "install.packages('RSelenium')" && \
R -e "install.packages('Rcpp')" && \
R -e "install.packages('ggplot2')" && \
R -e "install.packages('rpart.plot')" && \
R -e "install.packages('labeling')" && \
R -e "install.packages('reshape2')" && \
R -e "install.packages('shiny')" && \
R -e "install.packages('markdown')" && \
R -e "install.packages('shinydashboard')" && \
R -e "install.packages('knitr')" && \
R -e "install.packages('shinyjs')" && \
R -e "install.packages('shinythemes')" && \
R -e "install.packages('dtplyr')" && \
R -e "install.packages('stringr')" && \
R -e "install.packages('data.table')" && \
R -e "install.packages('xlsx')" && \
R -e "install.packages('sas7bdat')" && \
R -e "install.packages('readxl')" && \
R -e "install.packages('readr')" && \
R -e "install.packages('rjson')" && \
R -e "install.packages('leaflet')" && \
R -e "install.packages('RColorBrewer')" && \
R -e "install.packages('classInt')" && \
R -e "install.packages('maptools')" && \
R -e "install.packages('colorspace')" && \
R -e "install.packages('colourpicker')" && \
R -e "install.packages('mapproj')" && \
R -e "install.packages('maps')" && \
R -e "install.packages('scales')" && \
R -e "install.packages('sp')" && \
R -e "install.packages('FactoMineR')" && \
R -e "install.packages('FactoInvestigate')" && \
R -e "install.packages('missMDA')" && \
R -e "install.packages('RcmdrMisc')" && \
R -e "install.packages('ade4')" && \
R -e "install.packages('RTextTools')" && \
R -e "install.packages('tree')" && \
R -e "install.packages('kknn')" && \
R -e "install.packages('kernlab')" && \
R -e "install.packages('rpart')" && \
R -e "install.packages('e1071')" && \
R -e "install.packages('randomForest')" && \
R -e "install.packages('pls')" && \
R -e "install.packages('betareg')" && \
R -e "install.packages('glmnet')" && \
R -e "install.packages('leaps')" && \
R -e "install.packages('mlogit')" && \
R -e "install.packages('pROC')" && \
R -e "install.packages('caret')" && \
R -e "install.packages('wordcloud')" && \
R -e "install.packages('stringi')" && \
R -e "install.packages('SnowballC')" && \
R -e "install.packages('RWeka')" && \
R -e "install.packages('hunspell')" && \
R -e "install.packages('topicmodels')" && \
R -e "install.packages('magrittr')" && \
R -e "install.packages('cluster')" && \
R -e "install.packages('proxy')" && \
R -e "install.packages('skmeans')" && \
R -e "install.packages('LDAvis')" && \
R -e "install.packages('lsa')" && \
R -e "install.packages('doSNOW')" && \
R -e "install.packages('cartography')" && \
R -e "install.packages('Factoshiny')" && \
R -e "install.packages('cairoDevice', INSTALL_opts='--no-test-load')" && \
R -e "install.packages('rattle')"

RUN mkdir /root/.R/
RUN echo CXXFLAGS=-DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION > /root/.R/Makevars
RUN R -e "install.packages('prophet')"

# Be sure rstudio user has full access to his home directory
RUN mkdir -p /home/rstudio && \
chown -R rstudio:rstudio /home/rstudio && \
chmod -R 755 /home/rstudio

ENV HADOOP_CONF_DIR=/etc/hadoop/conf

#UPDATE SECURITY PACKAGE BEGIN
RUN apt-get update && apt-get upgrade -y
#UPDATE SECURITY PACKAGE END

COPY entrypoint /entrypoint
RUN chmod 755 /entrypoint

WORKDIR /sandbox

CMD ["/bin/sh", "-c", "/entrypoint"]
22 changes: 22 additions & 0 deletions certified/job/R/3.4.4/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2019 Pierre Leresteux.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.bmuschko.gradle.docker.DockerRemoteApiPlugin
import com.saagie.technologies.SaagieTechnologiesGradlePlugin

apply<DockerRemoteApiPlugin>()
apply<SaagieTechnologiesGradlePlugin>()
8 changes: 8 additions & 0 deletions certified/job/R/3.4.4/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -euo pipefail

if test -f main_script;
then sh ./main_script;
else exec "$@"
fi;
137 changes: 137 additions & 0 deletions certified/job/R/3.4.4/image_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
schemaVersion: "2.0.0"

metadataTest:
env:
- key: LANG
value: "en_US.UTF-8"
- key: LC_ALL
value: "en_US.UTF-8"
- key: RSTUDIO_VERSION
value: "1.1.447"
- key: R_VERSION
value: "3.4.4"
- key: "HADOOP_CONF_DIR"
value: "/etc/hadoop/conf"

fileExistenceTests:
- name: "/home/rstudio"
path: "/home/rstudio"
shouldExist: true
permissions: "drwxr-xr-x"
- name: "entrypoint"
path: "/entrypoint"
shouldExist: true
permissions: "-rwxr-xr-x"

commandTests:
- name: "R version"
command: "Rscript"
expectedOutput: ["R version 3.4.4*"]
args: ["-e", "R.version.string; getOption('repos')"]
- name: "Workdir"
command: "pwd"
expectedOutput: ["/sandbox"]
- name: check All libs
command: "bash"
args: [
"-c",
"
Rscript -e 'library(sqldf)' &&
Rscript -e 'library(syuzhet)' &&
Rscript -e 'library(TSclust)' &&
Rscript -e 'library(arules)' &&
Rscript -e 'library(arulesSequences)' &&
Rscript -e 'library(recommenderlab)' &&
Rscript -e 'library(AUC)' &&
Rscript -e 'library(kohonen)' &&
Rscript -e 'library(topicmodels)' &&
Rscript -e 'library(argparse)' &&
Rscript -e 'library(lsa)' &&
Rscript -e 'library(d3heatmap)' &&
Rscript -e 'library(pvclust)' &&
Rscript -e 'library(trend)' &&
Rscript -e 'library(breakpoint)' &&
Rscript -e 'library(changepoint)' &&
Rscript -e 'library(mvoutlier)' &&
Rscript -e 'library(shinydashboard)' &&
Rscript -e 'library(FNN)' &&
Rscript -e 'library(plotly)' &&
Rscript -e 'library(RMySQL)' &&
Rscript -e 'library(DescTools)' &&
Rscript -e 'library(doParallel)' &&
Rscript -e 'library(ff)' &&
Rscript -e 'library(ffbase)' &&
Rscript -e 'library(jsonlite)' &&
Rscript -e 'library(forecast)' &&
Rscript -e 'library(tseries)' &&
Rscript -e 'library(trend)' &&
Rscript -e 'library(rvest)' &&
Rscript -e 'library(curl)' &&
Rscript -e 'library(RSelenium)' &&
Rscript -e 'library(Rcpp)' &&
Rscript -e 'library(ggplot2)' &&
Rscript -e 'library(rpart)' &&
Rscript -e 'library(labeling)' &&
Rscript -e 'library(reshape2)' &&
Rscript -e 'library(shiny)' &&
Rscript -e 'library(markdown)' &&
Rscript -e 'library(shinydashboard)' &&
Rscript -e 'library(knitr)' &&
Rscript -e 'library(shinyjs)' &&
Rscript -e 'library(shinythemes)' &&
Rscript -e 'library(dtplyr)' &&
Rscript -e 'library(stringr)' &&
Rscript -e 'library(data.table)' &&
Rscript -e 'library(xlsx)' &&
Rscript -e 'library(sas7bdat)' &&
Rscript -e 'library(readxl)' &&
Rscript -e 'library(readr)' &&
Rscript -e 'library(rjson)' &&
Rscript -e 'library(leaflet)' &&
Rscript -e 'library(RColorBrewer)' &&
Rscript -e 'library(classInt)' &&
Rscript -e 'library(maptools)' &&
Rscript -e 'library(colorspace)' &&
Rscript -e 'library(colourpicker)' &&
Rscript -e 'library(mapproj)' &&
Rscript -e 'library(maps)' &&
Rscript -e 'library(scales)' &&
Rscript -e 'library(sp)' &&
Rscript -e 'library(FactoMineR)' &&
Rscript -e 'library(FactoInvestigate)' &&
Rscript -e 'library(missMDA)' &&
Rscript -e 'library(RcmdrMisc)' &&
Rscript -e 'library(ade4)' &&
Rscript -e 'library(RTextTools)' &&
Rscript -e 'library(tree)' &&
Rscript -e 'library(kknn)' &&
Rscript -e 'library(kernlab)' &&
Rscript -e 'library(rpart)' &&
Rscript -e 'library(e1071)' &&
Rscript -e 'library(randomForest)' &&
Rscript -e 'library(pls)' &&
Rscript -e 'library(betareg)' &&
Rscript -e 'library(glmnet)' &&
Rscript -e 'library(leaps)' &&
Rscript -e 'library(mlogit)' &&
Rscript -e 'library(pROC)' &&
Rscript -e 'library(caret)' &&
Rscript -e 'library(wordcloud)' &&
Rscript -e 'library(stringi)' &&
Rscript -e 'library(SnowballC)' &&
Rscript -e 'library(RWeka)' &&
Rscript -e 'library(hunspell)' &&
Rscript -e 'library(topicmodels)' &&
Rscript -e 'library(magrittr)' &&
Rscript -e 'library(cluster)' &&
Rscript -e 'library(proxy)' &&
Rscript -e 'library(skmeans)' &&
Rscript -e 'library(LDAvis)' &&
Rscript -e 'library(lsa)' &&
Rscript -e 'library(doSNOW)' &&
Rscript -e 'library(cartography)' &&
Rscript -e 'library(Factoshiny)' &&
Rscript -e 'library(rattle)' &&
Rscript -e 'library(prophet);'",
]
exitCode: 0
30 changes: 30 additions & 0 deletions certified/job/R/3.4.4/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version:
label: 3.4.4
isAvailable: true
defaultResources:
cpu: 0.3
memory: 512
disk: 512
features:
- field: COMMAND_LINE
label: Command line
isMandatory: true
comment: Linux shell command to launch the job.
defaultValue: Rscript {file} arg1 arg2
- field: ARTIFACT
label: Package
isMandatory: false
comment: "Compatible upload file : .r"
- field: SCHEDULER
label: Scheduled
isMandatory: true

techno:
id: df7226be-f11a-4c6f-8e7d-ee5d7964f340
label: R
available: false
icon: r
recommendedVersion: 3.4.4
docker:
image: saagie/r-image
version: 3.4.4-0.5.0_R
Loading

0 comments on commit bb7eb05

Please sign in to comment.