Repository navigation
Conversation
Explicit build of rstudio on the sudo-enabled base
Following suggestion of using 3.0.0, but noting existence of 3.3.2 at this time. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Removed pam-helper.sh script from Dockerfile.
Removed copying of pam-helper.sh to rstudio-server bin.
A secret was used in an ARG or ENV ... allowing this for now
… rstudio in a jetstream vm. however, the user identity is jupyter and it starts in /home/jupyter when we try to use this as a custom env under "rstudio" terra env control, the build process jumps to the jupyter type environment build process
R452brokenterra can be used in terra but only the console works
There was a problem hiding this comment.
🟡 Changes recommended
Missing build inputs, lost Bioconductor functionality, and runtime configuration defects remain unresolved.
11 open findings
Replacing terra-jupyter-r drops required R packages and IRkernel · New Docker build context omits required scripts and installer files · New Inherited Jupyter ENTRYPOINT prevents s6 and RStudio startup · New Malformed PATH and CUDA library path handling · New Rootless startup deletes the configured rserver user · New rserver uses hardcoded user instead of DEFAULT_USER · New Unauthenticated HTTP package download permits code tampering · New Renviron.site permissions block RStudio sessions from reading configuration · New R environment settings are written to an ignored file · New PIP_USER=true breaks pip installation in the virtual environment · New RStudio user lacks write access to the Terra workspace · New
What changed in this PR
Adds a community-contributed R 4.6.1 and RStudio environment for Terra/AnVIL alongside the existing notebook images.
Changes:
- Defines the RStudio container and its startup configuration.
- Adds installation helpers, examples, and image-inspection scripts.
- Revises the Jupyter R and Bioconductor Dockerfiles.
| File | Description |
|---|---|
| terra-rstudio-anvil/scripts/tests/nvblas.R | Adds a GPU matrix benchmark. |
| terra-rstudio-anvil/scripts/tests/examples_tf.R | Adds a Keras training example. |
| terra-rstudio-anvil/scripts/setup_R.sh | Configures R, OpenBLAS, and littler. |
| terra-rstudio-anvil/scripts/rsession.sh | Adds standalone RStudio session startup. |
| terra-rstudio-anvil/scripts/install_wgrib2.sh | Adds weather-data tooling installation. |
| terra-rstudio-anvil/scripts/install_verse.sh | Adds publishing packages and dependencies. |
| terra-rstudio-anvil/scripts/install_tidyverse.sh | Adds tidyverse and database packages. |
| terra-rstudio-anvil/scripts/install_tf1_cuda_10_0.sh | Adds legacy TensorFlow CUDA dependencies. |
| terra-rstudio-anvil/scripts/install_texlive.sh | Adds TeX Live installation. |
| terra-rstudio-anvil/scripts/install_tensorflow.sh | Adds Python and R Keras setup. |
| terra-rstudio-anvil/scripts/install_shiny_server.sh | Adds Shiny Server installation and startup. |
| terra-rstudio-anvil/scripts/install_s6init.sh | Installs the s6 supervisor. |
| terra-rstudio-anvil/scripts/install_rstudio.sh | Installs and configures RStudio Server. |
| terra-rstudio-anvil/scripts/install_R_source.sh | Builds R from source. |
| terra-rstudio-anvil/scripts/install_R_ppa.sh | Adds repository-based R installation. |
| terra-rstudio-anvil/scripts/install_quarto.sh | Installs or exposes Quarto. |
| terra-rstudio-anvil/scripts/install_python.sh | Configures Python and reticulate. |
| terra-rstudio-anvil/scripts/install_pyenv.sh | Adds Python version-management setup. |
| terra-rstudio-anvil/scripts/install_pandoc.sh | Installs Pandoc and templates. |
| terra-rstudio-anvil/scripts/install_nvtop.sh | Builds GPU monitoring tooling. |
| terra-rstudio-anvil/scripts/install_jupyter.sh | Adds Jupyter and R kernel setup. |
| terra-rstudio-anvil/scripts/install_julia.sh | Adds Julia and R integration packages. |
| terra-rstudio-anvil/scripts/install_geospatial.sh | Adds geospatial libraries and packages. |
| terra-rstudio-anvil/scripts/install_cuda-11.1.sh | Adds CUDA 11.1 installation. |
| terra-rstudio-anvil/scripts/install_cuda-10.1.sh | Adds CUDA 10.1 installation. |
| terra-rstudio-anvil/scripts/init_userconf.sh | Configures runtime users and preferences. |
| terra-rstudio-anvil/scripts/init_set_env.sh | Propagates selected environment settings. |
| terra-rstudio-anvil/scripts/experimental/install_rl.sh | Adds reinforcement-learning environment setup. |
| terra-rstudio-anvil/scripts/experimental/install_R_binary.sh | Adds experimental binary R installation. |
| terra-rstudio-anvil/scripts/experimental/install_geospatial_unstable.sh | Adds unstable geospatial repository setup. |
| terra-rstudio-anvil/scripts/experimental/install_dev_osgeo.sh | Builds geospatial libraries from source. |
| terra-rstudio-anvil/scripts/experimental/cuda10.2-tf.sh | Adds experimental CUDA dependency setup. |
| terra-rstudio-anvil/scripts/experimental/batch_user_creation.sh | Adds batch account creation. |
| terra-rstudio-anvil/scripts/default_user.sh | Creates the default application user. |
| terra-rstudio-anvil/scripts/config_R_cuda.sh | Configures CUDA paths and NVBLAS. |
| terra-rstudio-anvil/scripts/bin/install2.r | Adds an R package installation helper. |
| terra-rstudio-anvil/Dockerfile | Defines the Terra RStudio image. |
| terra-rstudio-anvil/CHECK/o4 | Records reference image metadata. |
| terra-rstudio-anvil/CHECK/chk4 | Inspects reference image environment settings. |
| terra-rstudio-anvil/CHECK/chk3 | Pulls the newer reference image. |
| terra-rstudio-anvil/CHECK/chk2 | Inspects older reference image settings. |
| terra-rstudio-anvil/CHECK/chk1 | Pulls and inspects the older image. |
| terra-jupyter-r/Dockerfile | Updates package versions and dependency installation. |
| terra-jupyter-bioconductor/Dockerfile | Replaces inheritance with an RStudio-oriented build. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
| @@ -1 +1,45 @@ | |||
| FROM us.gcr.io/broad-dsp-gcr-public/terra-jupyter-r:2.2.7 | |||
| FROM us.gcr.io/broad-dsp-gcr-public/terra-base:1.0.0 | |||
| ENV R_HOME="/usr/local/lib/R" | ||
| ENV TZ="Etc/UTC" | ||
|
|
||
| COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh |
| RUN /rocker_scripts/install_rstudio.sh | ||
|
|
||
| EXPOSE 8787 | ||
| CMD ["/init"] |
Comment on lines
+8
to
+9
| PATH={$PATH:-$PATH:$CUDA_HOME/bin} | ||
| LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-$LD_LIBRARY_PATH:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64} |
|
|
||
| if [ "${RUNROOTLESS}" = "true" ]; then | ||
| echo "deleting the default user ($DEFAULT_USER) since it is not needed." | ||
| userdel "$DEFAULT_USER" |
| @@ -0,0 +1,36 @@ | |||
|
|
|||
| ## Tensorflow: | |||
| install.packages('keras', repos='http://cran.us.r-project.org') | |||
Comment on lines
+20
to
+21
| ## ensure Renviron.site is only readable/writable by its owner: | ||
| chmod 600 "${R_HOME}/etc/Renviron.site" |
| fi | ||
| } | ||
|
|
||
| echo "PYTHON_CONFIGURE_OPTS=${PYTHON_CONFIGURE_OPTS}" >>"${R_HOME}/etc/R_environ" |
Comment on lines
+37
to
+38
| # Upgrade version of pip inside the virtualenv | ||
| python3 -m pip --no-cache-dir install --upgrade \ |
Comment on lines
+95
to
+96
| echo "session-default-working-dir=/home/jupyter" >> /etc/rstudio/rsession.conf | ||
| echo "session-default-new-project-dir=/home/jupyter" >> /etc/rstudio/rsession.conf |
Author
|
I had only intended to submit changes on one Dockerfile. I will refresh my fork and resubmit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This was blocked in May for various reasons possibly related to changes in Rstudio stack.
Now this Dockerfile defines a container that can be used as a community-contributed cloud
environment for terra/anvil.