-
Notifications
You must be signed in to change notification settings - Fork 42
using docker
- Install docker from its website https://docs.docker.com/get-docker/
- Get the image for R-devel with clang, on debian
docker pull rhub/debian-clang-devel
- Verify that you have it, with
docker images
- Run the image, with
docker run -it --rm rhub/debian-clang-devel
and you will be in a linux session. NOTE: the --rm
will remove whatever you do in the session. I don't know why the heck I just did that, but I need to stay in this session until I'm done debugging oce, because otherwise I'll need to reinstall quite a few system libraries using apt
and quite a few R packages. Sheesh.
- Install git with
apt install git-core
- Clone oce with
git clone https://github.com/dankelley/oce.git
(note that you can use git clone git@ETC
if you have local keys set up). Doing that would let you push changes.
- Now ... build it
opt/R-devel/bin/R CMD build oce
but note that you'll need to install other packages first. (FIXME: does the --rm
means we need to redo this in each session?) Here are some things I had to do at the system level
apt install git-core
apt install libssl-dev
apt install libudunits2-dev
apt install libgdal-dev
apt install vim
and at the R level, I had to install lots of things, at least the following (but likely many more that I've forgotten ... I'll add to this list if I recall them).
install.packages(c('akima', 'automap', 'knitr', 'lubridate',
'marmap', 'ncdf4', 'ocedata',
'raster', 'rgeos', 'rmarkdown', 'RSQLite', 'R.utils',
's2', 'sf', 'sp',
'testthat', 'tiff', 'XML'))
but there could be a dozen more. I need to figure out how to make my own docker container, in which I do that stuff.
- Now you may use
opt/R-devel/bin/R
to launch R. The normal course of events would be to work interactively, but at some point you will want to do the following.
/opt/R-devel/bin/R CMD build oce
/opt/R-devel/bin/R CMD check oce_1.7-3.tar.gz
/opt/R-devel/bin/R CMD INSTALL oce_1.7-3.tar.gz