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

Feature/workbench session #874

Merged
merged 16 commits into from
Nov 26, 2024
Merged

Feature/workbench session #874

merged 16 commits into from
Nov 26, 2024

Conversation

zachhannum
Copy link
Contributor

@zachhannum zachhannum commented Nov 19, 2024

Adds a new target for rstudio/workbench-session, which is a docker image that will eventually replace r-session-complete for use with the new session init container feature.

It is essentially a copy/paste of r-session-complete with two major differences:

  • Don't install Workbench/Session components
  • Don't install Quarto (included in the session init container) and TinyTex

@zachhannum zachhannum force-pushed the feature/workbench-session branch from 762bc58 to 5d9c081 Compare November 19, 2024 18:32
@zachhannum zachhannum force-pushed the feature/workbench-session branch from 31b0912 to ec39cda Compare November 20, 2024 14:43
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

workbench-session/README.md Show resolved Hide resolved

### Install TinyTeX using Quarto ###
RUN $SCRIPTS_DIR/install_quarto.sh --install-tinytex --add-path-tinytex
ENV PATH="/opt/python/jupyter/bin:/opt/python/bin:/usr/lib/rstudio-server/bin/quarto/bin:${PATH}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the init container install tinytex now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not. The discussion happened in #workbench-dev so I can't link it here, but I'll re-post my notes here:

I don't think the TinyTex installation works at all on the existing r-session-complete images:

zach.hannum@session-0da293c9ab5a7f73c50c8-zachhannum---vs-code-sessionqxv4f:~$ quarto tools
[✓] Inspecting tools

Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685  
tinytex      Not installed     ---           v2024.11

From root:

root@session-0da293c9ab5a7f73c50c8-zachhannum---vs-code-sessionqxv4f:~# which tlmgr
/usr/local/bin/tlmgr

root@session-0da293c9ab5a7f73c50c8-zachhannum---vs-code-sessionqxv4f:~# ls -al /usr/local/bin/tlmgr
lrwxrwxrwx 1 root root 37 Nov 21 12:18 /usr/local/bin/tlmgr -> /root/.TinyTeX/bin/x86_64-linux/tlmgr
zach.hannum@session-0da293c9ab5a7f73c50c8-zachhannum---vs-code-sessionqxv4f:~$ echo $PATH
/usr/lib/rstudio-server/bin/pwb-code-server/bin/remote-cli:/opt/python/jupyter/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Back in the session:

zach.hannum@session-0da293c9ab5a7f73c50c8-zachhannum---vs-code-sessionqxv4f:~$ stat /root/.TinyTeX/bin/x86_64-linux/tlmgr
stat: cannot statx '/root/.TinyTeX/bin/x86_64-linux/tlmgr': Permission denied

Okay, so it's on the PATH but we don't actually have the correct permissions to use it.
tinytex doesn't really seem to want to behave as a system dependency, it's installer sticks it in the user's home directory by default.

IMO we should just leave tinytex off the base installation and let users install it to their home directory via quarto if they need it.

@zachhannum zachhannum marked this pull request as ready for review November 21, 2024 16:53
Copy link
Contributor

@skyeturriff skyeturriff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a few comments!

docker-bake.hcl Outdated Show resolved Hide resolved
workbench-session/README.md Outdated Show resolved Hide resolved
workbench-session/test/goss.yaml Outdated Show resolved Hide resolved
@@ -185,6 +185,10 @@ variable WORKBENCH_BUILD_MATRIX {
}
}

variable WORKBENCH_SESSION_MATRIX {
default = PRO_BUILD_MATRIX
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, what's the reasoning behind inheriting all the base image builds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to content-pro, I didn't see a reason to not offer a few different combinations of R and Python versions for images. I'm happy to be overridden on that decision if it doesn't make sense, though.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I can understand that. I think this is fine for now. It's something we can take into account for future planning.

workbench-session/.snyk Outdated Show resolved Hide resolved
Copy link
Contributor

@bschwedler bschwedler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes overall look good.

I would like us to revisit the build matrix for these images at a later time, but having parity with the current r-session-complete images seems like a sensible path forward.

@zachhannum zachhannum merged commit 3277b3d into dev Nov 26, 2024
41 of 42 checks passed
@zachhannum zachhannum deleted the feature/workbench-session branch November 26, 2024 17:41
@zachhannum zachhannum restored the feature/workbench-session branch November 26, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants