dmedri m@iii@g oii gm@ii@com
2019-Dec-21 13:39 UTC
[Rd] Downsized R configuration for flat deployment
Dear folks, I'm testing a downsized R build - in features and obviously sizes - for a "modern" flat deployment (eg. like python virtualenv, just to name one). Questions: 1) Is flat style possible? 2) With this setup, R and packages can be installed/updated? 3) The directory can be easy renamed or moved? ------------------------------------------------------------------- I didn't find any official git repo, so I downloaded latest stable R release (3.6.2), exploring different setups of configure options. # tested in debian 10 # $ sudo apt-get build-dep r-base $ mkdir ~/r-virtual $ cd R-3.6.2/ $ ./configure --prefix=/home/dmedri/r-virtual/ \ --exec-prefix=/home/dmedri/r-virtual/ \ --without-recommended-packages \ --without-cairo \ --without-libtiff \ --without-jpeglib \ --without-x \ --without-aqua \ --without-tcltk \ --disable-rpath $ make && make install This minimal R could run inside a container, no desktop just cli, with just one graphical formats in output (png). Java support was leaved in. I didn't find options to disable html docs. Recommended packages were leaved out, for a 2nd stage. $ cd r-virtual/ $ ./bin/R The environment was there, "yes" to question 1). I can install/update packages, obviously with required includes installed in the system, not fetched online -- a limit, looking at python pip, partially by design/choice. BTW answer to question 2) is "yes" for packages, "no" for the core. Without the "--disable-rpath" option, abs paths break everything with the easy case of "renaming r-virtual directory". IMHO this option should be a general default, and another "yes" to question 3). While I'm still investigating, tips are welcome... HTH Best Regards, DM
Hi, FWIW this recent project of mine has somewhat similar goals: https://github.com/r-hub/r-minimal Gabor On Sat, Dec 21, 2019 at 2:40 PM <dmedri at gmail.com> wrote:> > Dear folks, > > I'm testing a downsized R build - in features and obviously sizes - > for a "modern" flat deployment (eg. like python virtualenv, just to > name one). > > Questions: > > 1) Is flat style possible? > 2) With this setup, R and packages can be installed/updated? > 3) The directory can be easy renamed or moved? > > ------------------------------------------------------------------- > > I didn't find any official git repo, so I downloaded latest stable > R release (3.6.2), exploring different setups of configure options. > > # tested in debian 10 > # $ sudo apt-get build-dep r-base > > $ mkdir ~/r-virtual > $ cd R-3.6.2/ > $ ./configure --prefix=/home/dmedri/r-virtual/ \ > --exec-prefix=/home/dmedri/r-virtual/ \ > --without-recommended-packages \ > --without-cairo \ > --without-libtiff \ > --without-jpeglib \ > --without-x \ > --without-aqua \ > --without-tcltk \ > --disable-rpath > > $ make && make install > > This minimal R could run inside a container, no desktop just cli, > with just one graphical formats in output (png). Java support was > leaved in. I didn't find options to disable html docs. Recommended > packages were leaved out, for a 2nd stage. > > $ cd r-virtual/ > $ ./bin/R > > The environment was there, "yes" to question 1). > > I can install/update packages, obviously with required includes > installed in the system, not fetched online -- a limit, looking at > python pip, partially by design/choice. BTW answer to question 2) > is "yes" for packages, "no" for the core. > > Without the "--disable-rpath" option, abs paths break everything > with the easy case of "renaming r-virtual directory". IMHO this option > should be a general default, and another "yes" to question 3). > > While I'm still investigating, tips are welcome... > > HTH > > Best Regards, > > DM > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
DM, can you clarify somewhat what you are exactly concerned about? The standard build of R on Linux is relocatable without any special flags needed since R doesn't use absolute paths but manages library path to its components itself so it's very flexible (e.g., I use this feature to run R jobs on Hadoop clusters that don't have R installed as the directory where the job components are unpacked is dynamic). You can always disable whatever features you don't need. In your question I don't understand what you mean by "flat" - on Linux all binaries are flat by default so please clarify what you mean. It's easy to create completely dynamic R deployment - and easy to install packages - both binary and from sources. Cheers, Simon> On Dec 21, 2019, at 8:39 AM, dmedri at gmail.com wrote: > > Dear folks, > > I'm testing a downsized R build - in features and obviously sizes - > for a "modern" flat deployment (eg. like python virtualenv, just to > name one). > > Questions: > > 1) Is flat style possible? > 2) With this setup, R and packages can be installed/updated? > 3) The directory can be easy renamed or moved? > > ------------------------------------------------------------------- > > I didn't find any official git repo, so I downloaded latest stable > R release (3.6.2), exploring different setups of configure options. > > # tested in debian 10 > # $ sudo apt-get build-dep r-base > > $ mkdir ~/r-virtual > $ cd R-3.6.2/ > $ ./configure --prefix=/home/dmedri/r-virtual/ \ > --exec-prefix=/home/dmedri/r-virtual/ \ > --without-recommended-packages \ > --without-cairo \ > --without-libtiff \ > --without-jpeglib \ > --without-x \ > --without-aqua \ > --without-tcltk \ > --disable-rpath > > $ make && make install > > This minimal R could run inside a container, no desktop just cli, > with just one graphical formats in output (png). Java support was > leaved in. I didn't find options to disable html docs. Recommended > packages were leaved out, for a 2nd stage. > > $ cd r-virtual/ > $ ./bin/R > > The environment was there, "yes" to question 1). > > I can install/update packages, obviously with required includes > installed in the system, not fetched online -- a limit, looking at > python pip, partially by design/choice. BTW answer to question 2) > is "yes" for packages, "no" for the core. > > Without the "--disable-rpath" option, abs paths break everything > with the easy case of "renaming r-virtual directory". IMHO this option > should be a general default, and another "yes" to question 3). > > While I'm still investigating, tips are welcome... > > HTH > > Best Regards, > > DM > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Il giorno sab, 21/12/2019 alle 14.45 +0000, G?bor Cs?rdi ha scritto:> FWIW this recent project of mine has somewhat similar goals: > https://github.com/r-hub/r-minimalThank you G?bor. FWIW, I wrote a bash prototype for my needs with some features: https://github.com/dmedri/roaster HTH Regards -- DM