rocker-org / rocker-versioned2

Run current & prior versions of R using docker. rocker/r-ver, rocker/rstudio, rocker/shiny, rocker/tidyverse, and so on.
https://rocker-project.org
GNU General Public License v2.0
419 stars 180 forks source link

rocker/rstudio:devel is a quite old R-devel daily snapshot #822

Closed slager closed 3 months ago

slager commented 6 months ago

Container image name

rocker/rstudio:devel

Container image digest

026eb393f3c076fff941ff1256480a3fd1607bdfe2b876a4593e3c79d19af24b

What operating system are you seeing the problem on?

Windows

System information

No response

Bug description

The image for rocker/rstudio:devel is old, even though the corresponding r-ver:devel image is from today. If I'm reading the documentation correctly, I think rstudio:devel is supposed to stay up-to-date with R-devel daily snapshots like r-ver:devel?

How to reproduce this bug?

https://hub.docker.com/r/rocker/rstudio/tags
eitsupi commented 6 months ago

This is related to the new release of Ubuntu. rocker/r-ver:devel has moved to Ubuntu 24.04 but RStudio Server is not able to install on this version of Ubuntu. We can see here how daily builds are failing. https://github.com/rocker-org/rocker-versioned2/actions/runs/9278089823/job/25528516000

My understanding is that this error occurs because Python2, which was a dependency in the past, cannot be installed on Ubuntu 24.04, and the script needs to be radically rewritten. Also, I don't know if RStudio Server would work properly even if it could be installed. (I don't use RStudio IDE on a regular basis).

I tried to fix that in #805, but I couldn't. If you know how to fix it, contributions are welcome.

slager commented 6 months ago

I presume there were other, more compelling reasons to have already switched to Ubuntu 24.04 when 22.04 is still supported for another 3+ years?

nathanweeks commented 6 months ago

Is python2 required, or could python3-setuptools be substituted? I tried the following patch against the "master" branch (just hard-coding UBUNTU_CODENAME for testing purposes):

--- a/scripts/install_rstudio.sh
+++ b/scripts/install_rstudio.sh
@@ -37,7 +37,7 @@ apt_install \
     libpq5 \
     psmisc \
     procps \
-    python-setuptools \
+    python3-setuptools \
     pwgen \
     sudo \
     wget
@@ -57,7 +57,7 @@ fi
 if [ "$UBUNTU_CODENAME" = "focal" ]; then
     UBUNTU_CODENAME="bionic"
 fi
-
+UBUNTU_CODENAME=jammy
 if [ "$RSTUDIO_VERSION" = "stable" ] || [ "$RSTUDIO_VERSION" = "preview" ] || [ "$RSTUDIO_VERSION" = "daily" ]; then
     if [ "$UBUNTU_CODENAME" = "bionic" ]; then
         UBUNTU_CODENAME="focal"

And the rstudio_devel.Dockerfile seemed to build & rstudio started successfully (though I haven't done any testing for breakage):

docker build -t localhost/rstudio-devel . -f dockerfiles/rstudio_devel.Dockerfile
...
docker run -it --rm -p 8787:8787 localhost/rstudio-devel
eitsupi commented 6 months ago

I presume there were other, more compelling reasons to have already switched to Ubuntu 24.04 when 22.04 is still supported for another 3+ years?

rocker/r-ver:devel is based on docker.io/library/ubuntu:latest. The version was changed upstream and I have done nothing with it.

Is python2 required, or could python3-setuptools be substituted? I tried the following patch against the "master" branch (just hard-coding UBUNTU_CODENAME for testing purposes):

Thanks for testing! In fact, I am unaware of any need for python3-setuptools since the currently recommended installation procedure uses gdebi-core.

infotroph commented 4 months ago

I'd like to help this get fixed -- we at the PEcAn project use the version-stable tags of rocker/tidyverse as our base images, and we've been very much appreciating being able to test against R-devel by simply changing tags. What input would be most useful to you to get the snapshot updating again?

I can confirm that a local build succeeds if I follow the pattern @nathanweeks showed above but remove python-setuptools entirely rather than replace it with python3-setuptools, and add libsqite-3-0.

Note that Rstudio itself appears currently broken at runtime on R-devel, but I don't think that affects the installation process. I'd like to selfishly vote for getting the image building anyway, so that I can run my tests (which don't need rstudio) in the downstream tidyverse container 😄

Edit to make it clear I don't actually know my way around the Rocker build process: I was able to make tidyverse:devel and rstudio:devel build with the patch above, but can't get any of the non-devel tags to work even in current master (they all fail during the apt-get steps of install_R_source.sh with various complaints from dpkg). Should I expect e.g. git pull origin master && docker build -t localhost/rstudio-4.3.3 . -f dockerfiles/rstudio_4.3.3.Dockerfile to work locally, or am I missing steps / needing to fix my build environment?

eitsupi commented 4 months ago

Thanks for taking a look at this. I opened #805 but for some reason I am stuck without RStudio installed. (Also I don't have the bandwidth to dig into this issue)

Edit to make it clear I don't actually know my way around the Rocker build process: I was able to make tidyverse:devel and rstudio:devel build with the patch above, but can't get any of the non-devel tags to work even in current master (they all fail during the apt-get steps of install_R_source.sh with various complaints from dpkg). Should I expect e.g. git pull origin master && docker build -t localhost/rstudio-4.3.3 . -f dockerfiles/rstudio_4.3.3.Dockerfile to work locally, or am I missing steps / needing to fix my build environment?

I don't think so. What error?

infotroph commented 4 months ago

what error?

[...snip...]
Building format(s) --all.
    This may take some time... 
fmtutil failed. Output has been stored in
[...snip...]
Errors were encountered while processing:
 tex-common

I poked a little further and was able to reproduce this in the upstream image with just

docker run --rm -it --platform linux/amd64 ubuntu:jammy \
    bash -c 'apt-get update && apt-get install -y --no-install-recommends texlive-extra-utils'

, so that failure isn't a Rocker issue.

I'll keep poking at the Rstudio install and report back if I get it working.

infotroph commented 3 months ago

To summarize, there are three separate issues here:

Rocker team (especially @eitsupi) input needed: I have a branch that fixes the first two and will open a PR if y'all want it, but I recognize the result will be up-to-date images with a currently-broken Rstudio in in them. What's your position on "the devel tag is for testing and might contain broken things" vs "don't build it unless you expect it to be usable"?

As I said above, for my own use case I'd love to get rocker/tidyverse:devel updating again even if it contains a nonfunctional Rstudio, but I know I am only one Rocker user.

eitsupi commented 3 months ago

Thanks, I think PullRequests are always welcome (though of course I can't promise they will be merged or not).

eitsupi commented 3 months ago

Closed by #805