-
Notifications
You must be signed in to change notification settings - Fork 33
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
Upgrade user image #62
Conversation
Earlier, interactive use of R somehow wasn't loading appropriate instructions on setting CRAN from Rprofile.site, resulting (partially) in errors like this: berkeley-dsep-infra/datahub#2255 (comment) My informed guess is that the `local{}` was scoping the effects, so it worked during build but not during interactive use. Removing that seems to make it work for both. Inspired by toolforge/paws#62
I dove into a rabbithole here about R default mirrors, and it helped me fix a long standing issue in my current job (berkeley-dsep-infra/datahub#2316), so yay! |
Thanks for this @yuvipanda. |
ENV PATH=/srv/paws/pwb:/srv/paws/bin:/srv/paws:$PATH | ||
|
||
USER ${NB_USER} | ||
RUN python3.6 -m venv /srv/paws | ||
RUN python3 -m venv /srv/paws | ||
|
||
# Install base notebook packages | ||
RUN pip install --no-cache-dir \ | ||
jupyterhub==1.1.0 \ |
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.
any reason to keep 1.1.0 here?
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.
Since the chart itself is running z2jh 0.9, which is jupyterhub 1.1. Once the chart is upgraded, this can be too
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.
LGTM, fixes jupyterlab build error as well. T227863
- Bump to Ubuntu 20.04. This brings in lots of newer packages, but particularly Python 3.8 (https://phabricator.wikimedia.org/T265957). Many new packages are 3.7+ only. - Use upstream R deb packages (https://cran.r-project.org/bin/linux/ubuntu/), than those from Ubuntu. This is maintained by the same folks who do R in debian. This brings us R 4.x (https://phabricator.wikimedia.org/T268923), but more importantly enables binary package installation. - Use packagemanager.rstudio.com to install R packages. This is a huge benefit - it can install any version of packges, and it has binary package builds for most of them! These binary packages are built against focal + the upstream R debs. See announcement info here: https://blog.rstudio.com/2020/07/01/announcing-public-package-manager/. This reduces the user image build time a *lot* - Put R packages in /srv/r, to match /srv/paws for our venv. Users can more easily install R packages temporarily now, and we don't mess with things under `/usr`. It also simplifies our Dockerfile, reducing number of times we have to switch to root. - Redirect most stdout from apt-get to /dev/null. We still get stderr, so no real functionality lost. - Remove some explicit nbextension enable / install commands. These are no longer necessary. - Specify a loose pin for notebook & jupyterlab versions.
I can merge and rebuild the image later if you like (will be fixing the deployhook eventually soon--promise!) |
I'll try to merge and deploy. |
Earlier, interactive use of R somehow wasn't loading appropriate instructions on setting CRAN from Rprofile.site, resulting (partially) in errors like this: berkeley-dsep-infra/datahub#2255 (comment) My informed guess is that the `local{}` was scoping the effects, so it worked during build but not during interactive use. Removing that seems to make it work for both. Inspired by toolforge/paws#62
Earlier, interactive use of R somehow wasn't loading appropriate instructions on setting CRAN from Rprofile.site, resulting (partially) in errors like this: berkeley-dsep-infra/datahub#2255 (comment) My informed guess is that the `local{}` was scoping the effects, so it worked during build but not during interactive use. Removing that seems to make it work for both. Inspired by toolforge/paws#62
but particularly Python 3.8 (https://phabricator.wikimedia.org/T265957).
Many new packages are 3.7+ only.
than those from Ubuntu. This is maintained by the same folks who
do R in debian. This brings us R 4.x (https://phabricator.wikimedia.org/T268923),
but more importantly enables binary package installation.
huge benefit - it can install any version of packges, and it has
binary package builds for most of them! These binary packages are
built against focal + the upstream R debs. See announcement info
here: https://blog.rstudio.com/2020/07/01/announcing-public-package-manager/.
This reduces the user image build time a lot
can more easily install R packages temporarily now, and we don't
mess with things under
/usr
. It also simplifies our Dockerfile,reducing number of times we have to switch to root.
so no real functionality lost.
no longer necessary.