8000 Suggestion: r-minimal developer image · Issue #98 · r-hub/r-minimal · GitHub
[go: up one dir, main page]

Skip to content

Suggestion: r-minimal developer image #98

Open

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.

Activity

  1. gaborcsardi commented on Feb 26, 2025

    @gaborcsardi
    Collaborator

    I don't really understand the full extent of the problem, but indeed to install system packages you'll need to have root access in some way.

    One solution is indeed to create an image that has the tools and packages you need, and then use that on your cluster. That's essentially how r-minimal works best: it helps you create your own image that is as small as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      0