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

Did repository reorganization delete a bunch of images for older versions of R? #800

Closed
wetlandscapes opened this issue May 1, 2024 · 6 comments
Labels

Comments

@wetlandscapes
Copy link

I'm trying to rebuild an image and noticed that I can no longer pull that version of R (4.2.0). Looking at the commit history, it looks like all the images for older versions (>=4.0.0) are available up until commit 07e82a0 by @eitsupi, which is referenced in #782. Now if I look in the dockerfiles/ directory there are only references to the R versions 4.2.3, 4.3.3, and 4.4.0.

I'm guessing this was not an intend outcome from the project reorganization, so wanted to it out to you all.

@eitsupi
Copy link
Member

eitsupi commented May 1, 2024

This is a completely intentional change. The new build script will remove the old Dockerfile.

# Clean up Dockerfiles
fs::dir_ls(path = "dockerfiles", regexp = r"((\d+\.){3}Dockerfile)") |>
remove_unsupported_files(supported_versions)

If you need an older Dockerfile, I recommend checking out the commit you need and using it.

@eitsupi eitsupi closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2024
@eitsupi
Copy link
Member

eitsupi commented May 1, 2024

By the way, why do you want to rebuild the image?

@wetlandscapes
Copy link
Author

Apologies. I need to be more precise. I meant pulling the images. Either way, the image I relied on is no longer there (and a bunch of documentation on the rocker website is no longer up to date, because they reference R versions that are seemingly no longer supported).

I'm using the images for reproducible science. Once I start a manuscript I don't update my R version because I want the analysis to be as reproducible as possible, which means not switching R versions, packages, etc during the life of the project so I can be more confident I didn't inadvertently make the code unrunnable due to some change in an underlying version of R or package I was using. My impression was that was an underlying principle of this project -- reproducibility across minor (or even patch) version updates of R.

Also seems a bit inconsistent to only have images of some versions of R. Does that mean you all aren't going to build images for the latest minor versions of R? How do you choose?

I guess I'm just kind of baffled by this seemingly random (from my perspective) change in how all this is run.

That said, I DO very much appreciate y'all's hard work on this. It's changed the way I manage science projects, for the better. Just kind of frustrating that I'm near the end of writing a manuscript and these changes break my environment, meaning I may need to spend days or weeks re-running stuff to ensure my analysis generates the same ouptuts with a different version of R.

@eitsupi
Copy link
Member

eitsupi commented May 1, 2024

Sorry, but I am not understanding what you are trying to say.
Is "pulling the images" you said referring to something like the docker pull command?

I don't think the availability of an image on a container registry like DockerHub has anything to do with whether the Dockerfile on GitHub that pushed the image has been removed.
In other words, your failure to pull the image has nothing to do with the fact that I deleted the Dockerfile.

$ date
Thu May  2 07:51:10 JST 2024
$ docker run --rm -it rocker/r-ver:4.2.0 R --version
Unable to find image 'rocker/r-ver:4.2.0' locally
4.2.0: Pulling from rocker/r-ver
17d0386c2fff: Pull complete
5b28f130c170: Pull complete
1847e2a2f79e: Pull complete
f9408f27ba52: Pull complete
c54999510c88: Pull complete
Digest: sha256:53ae350adb0d7807533bc27026923ef1a02bcd9b15e7df016a48b9ca9a003b3a
Status: Downloaded newer image for rocker/r-ver:4.2.0
R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

The image I just pulled for testing is an exact match to the following image listed in the wiki of this repository.
https://github.com/rocker-org/rocker-versioned2/wiki/r-ver_528b3dd75631

@wetlandscapes
Copy link
Author

🤦 This may be a firewall issue on my end (which my org controls) and the randomness that my stuff broke when the dockerfiles here were deleted (and my conflation of the two things). I'll keep digging, but if you don't here back from me, that was it.

On the upside, I did learn something: I'd previously assumed there was a closer relationship between the dockerfiles in this repo and the images on docker hub, but apparently that's not that works.

Thanks for your quick and patient response!

@eitsupi
Copy link
Member

eitsupi commented May 2, 2024

I'd previously assumed there was a closer relationship between the dockerfiles in this repo and the images on docker hub, but apparently that's not that works.

That is correct. The user needs to find out how the image that actually resides on the container registry was built.

Since images built from this repository always have a label (org.opencontainers.image.revision) that records the Git commit hash and the build is completely performed by GitHub Actions, so we can track which source code the image was built from by examining the image.

docker buildx bake -f $(BAKE_JSON) --set=*.labels.org.opencontainers.image.revision=$(IMAGE_REVISION) $(BAKE_OPTION) $*

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

No branches or pull requests

2 participants