Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Dockerfile to build docker images #7

Closed
Chris-Schnaufer opened this issue Jul 20, 2020 · 7 comments
Closed

Add a Dockerfile to build docker images #7

Chris-Schnaufer opened this issue Jul 20, 2020 · 7 comments

Comments

@Chris-Schnaufer
Copy link
Contributor

Building Docker images with the base requirements met would allow others to use FIELDimageR with less startup overhead.

I created a Dockerfile at https://github.com/Chris-Schnaufer/FIELDimageR/blob/add_dockerfile/Dockerfile that can be merged (if desired) and used to build and distribute a Docker image.

@dlebauer
Copy link
Contributor

A few thoughts:

  • Use a versioned image?
  • rocker provides scripts install2.r and installGithub.r that simplifies installation of R packages. So an alternative for installing the R packages might be:
FROM rocker/rstudio:3.6.3
MAINTAINER="Chris Schnaufer <schnaufer@email.arizona.edu>"

RUN apt-get update && apt-get install -y --no-install-recommends \
    libxml2-dev 
    zlib1g-dev 
    libfftw3-dev 
    gdal-bin 
    libgdal-dev 
    libxt-dev

RUN install2.r --error \
    sp
    raster
    rgdal
    scales
    xml2
    git2r
    usethis
    fftwtools
    devtools

RUN installGithub.r filipematias23/FIELDimageR

In addition, If you start from rocker/geospatial you get a lot of these dependencies already built in (including tidyverse and a lot of geospatial utilities - not just those required by FieldImageR but some that could be useful for running downstream analyses, as well as a lot of bloat!!)

@filipematias23
Copy link
Collaborator

Thank you for sharing ..!!!

@Chris-Schnaufer
Copy link
Contributor Author

Chris-Schnaufer commented Jul 21, 2020

I have updated the Dockerfile to take advantage of suggested installation changes.

I am putting the suggested additions for downstream analysis into another issue: #9

@Chris-Schnaufer
Copy link
Contributor Author

Linking to #10

@dlebauer
Copy link
Contributor

dlebauer commented Dec 4, 2020

this can be closed since #10 has been merged and suggestions for improvement are in #9

@filipematias23
Copy link
Collaborator

Hi @Chris-Schnaufer and @dlebauer,
Thank you a lot for helping with this project.
I am wondering what is the next step? How can I integrate your suggestions (#9 and #10) to the tutorial?

All the best,
Filipe

@Chris-Schnaufer
Copy link
Contributor Author

I am wondering what is the next step? How can I integrate your suggestions (#9 and #10) to the tutorial?

I think the next step as described in #9 would be to determine if those are changes that are desired and, if so, update the Dockerfile to use the new base image. I don't know who would be best suited to determine if those changes are desired

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants