Re: [Rd] Docker versus Vagrant for reproducability - was: The case for freezing CRAN

2014-03-22 Thread Philippe GROSJEAN
On 21 Mar 2014, at 20:21, Gábor Csárdi  wrote:

> On Fri, Mar 21, 2014 at 11:12 AM, Rainer M Krug  wrote:
> 
>> Gábor Csárdi  writes:
>> 
>>> You might want to look at packer as well, which can build virtual
>> machines
>>> from an ISO, without any user intaraction. I successfully used it to
>> build
>>> VMs with Linux, OSX and Windows. It can also create vagrant boxes. You
>> can
>>> specify provisioners, e.g. to install R, or a set of R packages, etc. It
>> is
>>> under heavy development, by the same team as vagrant.
>> 
>> I think I am getting lost in these - I looked ad Docker, and it looks
>> promising, but I actually didn't even manage to sh into the running
>> container. Is there somewhere an howto on how one can use these in R, to
>> the purpose discussed in this thread? If not, I really think this would
>> be needed. It is extremely difficult for me to translate what I want to
>> do into the deployment / management / development scenarios discussed in
>> the blogs I have found.
>> 
> 
> I haven't tried Docker, so I cannot say anything about that. The purpose of
> vagrant and packer is slightly different, but there seems to be some
> overlap.
> 
> Packer helps you building a virtual machine from an ISO, automatically,
> without any human interaction. That's pretty much it. The result can be a
> VirtualBox, VMWare, etc. virtual machine, or even a vagrant box. I used it
> to build Ubuntu, OSX and Windows boxes, it works great if you have a
> working configuration. If you need to tweak a config to install additional
> software, etc. then it requires some experimenting and patience, because
> debugging is not that great.
> 
> Vagrant manages disposable virtual machines. I.e. it takes a vagrant box,
> which is essentially a VM and some extra configuration info, provisions it,
> which usually means installing software or setting up a development
> environment, and then manages it, so that you can ssh to it, or do whatever
> you want with it.
> 
> There are a number of boxes available, so if you want a minimal VM with
> Ubuntu32, it takes one command to create it from a public box, another one
> starting it, and a third one to ssh to it. It is literally a couple of
> minutes, downloading the box takes longest. If you have the box, then it is
> even quicker.
> 
> You can use packer and vagrant together. Packer creates the vagrant box,
> sets up a very minimal environment. Then you can use vagrant with this box.
> 
> In my opinion it is somewhat cumbersome to use this for everyday work,
> although good virtualization software definitely helps.
> 
> Gabor
> 
Additional info: you access R into the VM from within the host by ssh. You can 
enable x11 forwarding there and you also got GUI stuff. It works like a charm, 
but there are still some problems on my side when I try to disconnect and 
reconnect to the same R process. I can solve this with, say, screen. However, 
if any X11 window is displayed while I disconnect, R crashes immediately on 
reconnection.
Best,

PhG




>   [[alternative HTML version deleted]]
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Docker versus Vagrant for reproducability - was: The case for freezing CRAN

2014-03-22 Thread Nathaniel Smith
On 22 Mar 2014 12:38, "Philippe GROSJEAN" 
wrote:
>
> On 21 Mar 2014, at 20:21, Gábor Csárdi  wrote:
> > In my opinion it is somewhat cumbersome to use this for everyday work,
> > although good virtualization software definitely helps.
> >
> > Gabor
> >
> Additional info: you access R into the VM from within the host by ssh.
You can enable x11 forwarding there and you also got GUI stuff. It works
like a charm, but there are still some problems on my side when I try to
disconnect and reconnect to the same R process. I can solve this with, say,
screen. However, if any X11 window is displayed while I disconnect, R
crashes immediately on reconnection.

You might find the program 'xpra' useful. It's like screen, but for x11
programs.

-n

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Docker versus Vagrant for reproducability - was: The case for freezing CRAN

2014-03-22 Thread Kirill Müller


On 03/22/2014 02:10 PM, Nathaniel Smith wrote:

On 22 Mar 2014 12:38, "Philippe GROSJEAN" 
wrote:

On 21 Mar 2014, at 20:21, Gábor Csárdi  wrote:

In my opinion it is somewhat cumbersome to use this for everyday work,
although good virtualization software definitely helps.

Gabor


Additional info: you access R into the VM from within the host by ssh.

You can enable x11 forwarding there and you also got GUI stuff. It works
like a charm, but there are still some problems on my side when I try to
disconnect and reconnect to the same R process. I can solve this with, say,
screen. However, if any X11 window is displayed while I disconnect, R
crashes immediately on reconnection.

You might find the program 'xpra' useful. It's like screen, but for x11
programs.

-n
I second that. However, by default, xpra and GNU Screen are not aware of 
each other. To connect to xpra from within GNU Screen, you usually need 
to set the DISPLAY environment variable manually. I have described a 
solution that automates this, so that GUI applications "just work" from 
within GNU Screen and also survive a disconnect: 
http://krlmlr.github.io/integrating-xpra-with-screen/ .



-Kirill

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Docker versus Vagrant for reproducability - was: The case for freezing CRAN

2014-03-22 Thread Dirk Eddelbuettel

On 22 March 2014 at 13:10, Nathaniel Smith wrote:
| You might find the program 'xpra' useful. It's like screen, but for x11
| programs.

There are also NXserver/NXclien/FreeNX which keep 'x11 / xdm sessions' and
can resume / reconnect when the client dies.  I find x2go quite useful at work.

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Varying results of package checks due to random seed

2014-03-22 Thread Radford Neal
> From: Philippe GROSJEAN 
>
> ... for latest CRAN version, we have successfully installed 4999
> packages among the 5321 CRAN package on our platform. ... It is
> strange that a large portion of R CMD check errors on CRAN occur and
> disappear *without any version update* of a package or any of its
> direct or indirect dependencies! That is, a fraction of errors or
> warnings seem to appear and disappear without any code update. 

Some of these are likely the result of packages running tests using
random number generation without setting the random numbers seed, in
which case the seed is set based on the current time and process id,
with an obvious possibility of results varying from run to run.

In the current development version of pqR (in branch 19-mods, found at
https://github.com/radfordneal/pqR/tree/19-mods), I have implemented a
change so that if the R_SEED environment variable is set, the random
seed is initialized to its value, rather than from the time and
process id.  This was motivated by exactly this problem - I can now
just set R_SEED to something before running all the package checks.

   Radford Neal

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel