The bbtools install pushed the mini-r image to a local registry in our machines.
Using ops we can pull this docker image and create a nano vm out of it.
ops pkg from-docker localhost:5000/mini-r -n mini-r -f Rscript
ops pkg load -l mini-r -c config.json
Here as we can see we get a seg fault. On analysing using gdb debug I didn’t find anything suspicious.
I spoke to the CEO of nanovms and the creator of ops and he said that there is an issue with executing Rscript because Rscript command forks thrice and that is not allowed by nanovms and therefore the official R package uses the R command and not Rscript for build purposes.
So I then tried to build the execution using R
ops pkg from-docker localhost:5000/mini-r -n mini-r -f R
ops pkg load -l mini-r -c config.json
Now I get error saying that only ELF binaries are supported but here when using -f R it creates a POSIX shell instead which is not executable.
using -f Rscript however createsa ELF binary but due to the forking issue it can’t run a script.
I have also tried the same thing r-base, rhub/ubuntu-gcc-release, rhub-minimal etc docker images but was met with the same predicaments.
So finally I was able to run the hello.R script with the official R package that ops provides (ops pkg list).