[go: nahoru, domu]

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

Upgrade user image #62

Merged
merged 1 commit into from
May 22, 2021
Merged

Conversation

yuvipanda
Copy link
Collaborator
  • 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.

yuvipanda added a commit to yuvipanda/datahub-old-fork that referenced this pull request Apr 17, 2021
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
@yuvipanda
Copy link
Collaborator Author

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!

@chicocvenancio
Copy link
Member

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

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?

Copy link
Collaborator Author

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

chicocvenancio
chicocvenancio previously approved these changes Apr 19, 2021
Copy link
Member
@chicocvenancio chicocvenancio left a 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.
@crookedstorm
Copy link
Collaborator

I can merge and rebuild the image later if you like (will be fixing the deployhook eventually soon--promise!)

@chicocvenancio
Copy link
Member

I'll try to merge and deploy.

@chicocvenancio chicocvenancio merged commit 6eb075e into toolforge:master May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants