Repository of Docker Images for FastR using GraalVM CE Community Edition
421
latest which is the default, give the latest stable Community Version of Graal/FastR, using debian as base dev give the development version of Community Version of Graal/FastR, using debian as base colab an effort to bring fastr to run under Google Colaboratory.
Using Docker images is a great way to develop quality and reproducible research analysis. Use docker images, to run Gnu-R, FastR, Python, or any mix of tools. Even Gui application, like QGis, could run under docker with a few adjusts.
Some advantages of this approach are:
You could create a well defined environment to your research task. Where the tools and packages are in their respective versions that are need to run. No more need to uninstall and install tools and packages in your computer. All this tools will be containerized under docker and isolated of your system.
Containers could be shared, moved and accessed remotely.
Publish a paper, working in a group ? just publish your docker to others use.
Need more power? For example, you develop a research that is too slow to your computer, just move you docker image to some Cloud Provider, or other Supercomputer/Cluster that you have access. You will don't need to prepare, or ask to IT prepare the environment to run.
FastR is compatible implementation from source of GNU-R Language Packages using Trufle and GraalVM compiler and run under GraalVM universal virtual machine which run self-optimizing AST interpreters. What this mean? Unlike R and other interpreted languages an AST interpreter like GraalVM learn to optimize performance while running. In this way longer process can get performance like a machine C/C++ compiler or even better.
Get more information's about compatibility, parameters, etc in GraalVM Reference Manual for R
docker pull jobdiogenes/fastr
Running until exit
--rm option mean that after exit, the container will be removed.
--name defined a name to your newly created container
-v /my-folder-path:/inside-container-path map a local folder, remote, or docker volume to a container path.
docker run --rm -it --name mytest -v /path-to/my-local/data-and-scripts:/mnt Rscript /mnt/mytest.R
Notes: Here and even, its highly recommended that in yours scripts NEVER use paths points to outside your script folder, like "../data.csv".
Loading a FastR Docker that will stay running in background and restart if stopped
-d mean that docker will load and stay running in background until you call to stop or remove. $(pwd) mean (Linux,Unix,OSX,Nix, only) that will replace to the path od current folder where you are calling.
docker run -d --restart always --name myfastr -v $(pwd)/data:/mnt jobdiogenes/fastr
This kind of call is usefull when you have scripts that takes long to run, and if something happens you want autorestart. Of course, in this situation your script must deal with errors and restarting. Another use, is to serve aplications, or enviroment to remote access or just that you use frequently.
Loading, Prepare, Save and Reuse
# Loading
docker run --rm -it --name mythesis jobdiogenes/fastr:latest
## Prepare now, the FastR running container to your needs.
# Run R and then install your packages there.
R
# Or call a script that is in the folder that you map to do this.
Rscript /mnt/install-packages.R
## You could even copy data to the container.
# Remember this could make your docker image bigger. But, its great
# for easy reproducibility.
mkdir /data
cp /mnt/data/* /data
While running, you container, in another terminal/console session do it:
docker export mythesis -o mythesis.tar
After saving, you could exit, stop or remove the docker that you was using.
Now you could share your docker image file. Reuse it by doing it:
docker load -i mythesis.tar
Use github issue to contact-me
Content type
Image
Digest
sha256:a2da83d23…
Size
683.9 MB
Last updated
about 2 years ago
docker pull jobdiogenes/fastr