-
Notifications
You must be signed in to change notification settings - Fork 2
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
Starts Dockerfile + GitHub action for building and pushing #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! This is already a huge step in the right direction.
My questions:
- Can we install the package into the container on build? I had been doing something like this to allow layer caching with code changes. Are you able to use pieces from that?
- If yes to the above, can we run the tests with
testthat::test_local()
rather than R CMD check? Or is that redundant because R CMD check will have passed for the install to work? - Can we think a little more about when the image build should run? I think on merge to main is an obvious candidate in addition to the manual trigger.
- Also is the geospatial image still required? Can we use something slimmer?
- Can you give a little more context on what the Makefile is for? Local debugging? Is it used in the Action somehow?
@zsusswein, my replies:
Sure, I have modified it to do so. Since I am installing the dependencies via
I am including the built version of the package in the image now, so you can run R CMD check after the fact. We can have R CMD check to fail, I think.
I see this image as just the requirements for the package. Pre-building it will save lots of time and that should only be updated if you want to get different versions of the dependencies whatsoever. I don't see the need to re-run the process whenever you update the repo.
You can use something slimmer, but that would cost you time. Right now, firing up the image takes about 1 minute; and building roughly 20. Trying to use something like
I use |
Does this
Great, thank you!
and
I'm not really following this? My understanding is that the very slow builds on the CDCent version is because that repository has a much larger codebase. The resulting image has many more dependencies and builds very slowly. In contrast, in this repo R CMD check with no caching takes ~10 mins. Isn't that about the maximum build time with no cache that we should expect?
Sounds good -- was just curious! |
OK @zsusswein; the GHA workflow now has the build+push step cached as a function of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! A couple minor things:
- I think you dropped the
run_tests
job in 47bf9bc. Was that on purpose? I left comments to add it back in, but feel free to reject and remove references to it if you think it's otherwise covered. - I think the Makefile might need to be updated?
These are all minor questions -- trying to make sure I understand enough to maintain this once you roll onto bigger & better things! I think core functionality here is done.
Co-authored-by: Zachary Susswein <[email protected]>
I moved the R CMD check to be executed inside of the build process. Thus, the build process will fail if R CMD check fails as well.
I think I did now! |
rocker/geospatial:4.4.1
.Dockerfile-dependencies
build + push based on theDESCRIPTION
andDockerfile-dependencies
file. The resulting image isgvegayon/cfa-epinow2-pipeline-dependencies:latest
gvegayon/cfa-epinow2-pipeline-dependencies:latest
as a baseline, it builds another image calledgvegayon/cfa-epinow2-pipeline:latest
that installs the package. The docker file is./Dockerfile
.