Skip to content

Suggestion: r-minimal developer image #98

@assaron

Description

@assaron

I was trying to use r-minimal image on an HPC cluster at my university, which the scheduler that only accepts docker-based jobs. To decrease the start-up time I want to use the vanilla r-minimal image and have installed packages to be stored on the file system and mounted to docker container as a volume. However, it turned out that I can't use installr script to install packages to the docker volume since the docker jobs on cluster are executed under low-privileged user, while root access is required for installr to work.

As a workaround I created an r-minimal based docker image with compilers preinstalled. That way I can use it to install packages via R's install.packages, and use vanilla r-minimal to run the scripts. I'm not sure how this scenario could be useful to other people, but in case it is, I would suggest to create a separate docker image with some build dependencies. The following Dockerfile worked well for me (to install RcppParallel and Matrix packages):

from rhub/r-minimal:4.4.1
RUN installr -c -a "linux-headers gfortran"

Alternatively, and probably a more systematic solution, would be to make installr work without root permissions, but I'm not sure if it's possible. Unfortunately I also not sure how to reproduce this behavior locally: it's probably a version of a rootless docker, but I don't know the details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions