Singularity image for R.
This is still a work in progress.
You can build a local Singularity image named singularity-r.sif
with:
sudo singularity build singularity-r.sif singularity-r.def
Instead of building it yourself you can download the pre-built image from the Cloud Library with:
singularity pull singularity-r.sif library://nickjer/default/singularity-r:4.2.1
WARNING: This pre-built image comes with OpenBLAS installed using the Debian binary packages. Be sure to run any tests with libraries that leverage OpenBLAS in your enviroment. If you notice any odd results it may be best to build this image from scratch on the machine you intend to run it on. See instructions under the Build section above.
Or alternatively you can mount the locally installed OpenBLAS library into the container using...
singularity run \ --bind "/path/on/host/to/libopenblas.so:/usr/lib/R/lib/libblas.so.3" \ singularity-r.sif
The R
command is launched using the default run command:
singularity run singularity-r.sif
or as an explicit app:
singularity run --app R singularity-r.sif
Example:
$ singularity run --app R singularity-r.sif --version
...
The Rscript
command is launched as an explicit app:
singularity run --app Rscript singularity-r.sif
Example:
$ singularity run --app Rscript singularity-r.sif --version
...
Bug reports and pull requests are welcome on GitHub at https://github.com/nickjer/singularity-r.
The code is available as open source under the terms of the MIT License.