-
Notifications
You must be signed in to change notification settings - Fork 3
Custom R Installation
New in version v0.9.8 is the ability for users to specify a custom R installation for their processing to run.
The R package must be a compiled binaries. The steps below where used to create the reference R binaries.
-
Download the R source from http://www.r-project.org/
-
Make the R installation directory. This is where R will be installed after compiling.
$ mkdir R
-
Untar and compile the R source. Compiling could take several minutes:
$ tar xzf R-3.0.1.tar.gz $ cd R-3.0.1 $ ./configure --with-x=no --prefix=`pwd`/../R $ make && make install
-
Modify the R scripts to make the R binaries portable.
-
Edit
R/bin/R
, the diff is here -
Copy the R script to
R/lib64/bin/
:$ cp R/bin/R R/lib64/bin/
-
Once you have completed these steps, you will have a portable R installation. You can start this instance of R by executing the R script:
$ ./R.new/bin/R
R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
You may install any package(s) need for your computation in the newly created personal R. Once you are completed, package the Tar file:
$ tar czf myR.tar.gz R/
You may download a pre-build R-binary here. After downloading, you may untar the directory:
$ tar xzf el5-R-modified.tar.gz
After that, you should have a functioning R distribution. You may install your custom packages by calling the R located inside the directory you just untarred:
$ ./R/bin/R CMD INSTALL --build GridR_0.9.9.tar.gz
After you have completed installing packages into the pre-build R binaries directory. You may tar it back up and move it onto a web server for hosting (see below for hosting instructions).
$ tar czf MyOwnR.tar.gz R/
Once you have created the portable R executable, you can host the tar file on a webserver and download it each time the job runs.
It can be specified with the command Rurl
to the grid.init
function. When the remote job runs, it will check the Last-Modified
time on the URL vs the last time the local R installation was completed to determine if the local R installation is outdated. If the installation is outdated, it will download the new R version, and install it.
> library(GridR)
> grid.init(service="bosco.direct", localTmpDir="tmp", Rurl="http://webserver.url.com/MyOwnR.tar.gz")
For help, email the bosco mailing list. Or visit Bosco Contact