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

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

Closed
slager opened this issue May 29, 2024 · 10 comments · Fixed by #805
Closed

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

slager opened this issue May 29, 2024 · 10 comments · Fixed by #805
Labels
enhancement New feature or request

Comments

@slager
Copy link

slager commented May 29, 2024

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
@slager slager added the bug Something isn't working label May 29, 2024
@eitsupi
Copy link
Member

eitsupi commented May 29, 2024

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.

@eitsupi eitsupi added the help wanted Extra attention is needed label May 29, 2024
@slager
Copy link
Author

slager commented May 29, 2024

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
Copy link

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
Copy link
Member

eitsupi commented May 29, 2024

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.

@eitsupi eitsupi added enhancement New feature or request and removed bug Something isn't working labels Jun 8, 2024
@infotroph
Copy link

infotroph commented Jul 18, 2024

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
Copy link
Member

eitsupi commented Jul 19, 2024

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

This comment was marked as off-topic.

@infotroph
Copy link

To summarize, there are three separate issues here:

  • In the apt step, need to remove python-setuptools and add libsqlite3-0. The gdebi approach in fix: use gdebi-core to install RStudio #805 still fails with the fixes below, but I have not looked into why.
  • When downloading Rstudio Server, there's not yet an official link for Ubuntu 24; Posit says to use the Ubuntu 22 links for now. Fix by setting UBUNTU_CODENAME="jammy"; since this is the devel tag would it also make sense to set RSTUDIO_VERSION to latest or daily?
  • The above makes the image build, but Rstudio throws errors at runtime because it calls private API entrypoints which have been removed from the development branch of R. No fix available yet.

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
Copy link
Member

eitsupi commented Aug 8, 2024

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

@eitsupi
Copy link
Member

eitsupi commented Aug 10, 2024

Closed by #805

@eitsupi eitsupi closed this as completed Aug 10, 2024
@eitsupi eitsupi removed the help wanted Extra attention is needed label Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants