[R] xvfb? cron job updates R packages, fails on some requiring X11
Dirk Eddelbuettel
edd at debian.org
Thu Jan 19 18:22:31 CET 2017
Paul,
Just prefix the command as you would with, say, /usr/bin/time. An example is here:
https://github.com/RcppCore/rcpp-logs/blob/master/scripts/runRcppDepends.r#L140L-L142
from the script I use to test all Rcpp dependencies -- now over 900 -- unattended.
Some packages also need OpenGL which the default does not give you. But the
r-cran.mk script building several hundred r-cran-* package for the Debian and
Ubuntu distros -- as well as several _thousand_ r-cran-* packages via Michael
Rutter's repos for Ubuntu, and included in every installation, does this:
## xvfb-run with GL extension and default resolution
xvfbSrvArgs = -screen 0 1024x768x24 -ac +extension GLX +render -noreset
[...]
if test -f /usr/bin/xvfb-run; then \
$(makeFlagsCall) xvfb-run -a -n 20 \
-s "${xvfbSrvArgs}" \
R CMD INSTALL -l $(debRlib) --clean \
$(extraInstallFlags) . \
$(builttimeStamp) \
; \
I guess you can piece the rest together. Now, if you just used Ubuntu LTS
instead of insisting on CentOS you wouldn't even have to compile them
locally. Might be worth a consideration or test deployment.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-help
mailing list