Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The image has a build-blocking package installation, disabled authentication, unreadable runtime R configuration, and missing publishing integration.
7 open findings
Keep RStudio authentication enabled by default · New Register terra-rstudio-anvil in build and publish configuration · New Fix CUDA PATH and library path assignments · New Use CRAN_SOURCE when configuring the default repository · New Make Renviron.site readable by unprivileged RStudio sessions · New Persist PYTHON_CONFIGURE_OPTS in shell startup configuration · New Export RStudio environment variables before launching rsession · New
What changed in this PR
Adds a fresh Terra-compatible RStudio image using R 4.6.1 and supporting installation scripts.
Changes:
- Builds and configures R and RStudio Server.
- Adds optional CUDA, Python, geospatial, publishing, and scientific tooling.
- Adds image-inspection helpers and example tests.
| File | Description |
|---|---|
terra-rstudio-anvil/Dockerfile |
Defines the RStudio image. |
terra-rstudio-anvil/CHECK/chk1 |
Pulls and inspects an older image. |
terra-rstudio-anvil/CHECK/chk2 |
Inspects the older image environment. |
terra-rstudio-anvil/CHECK/chk3 |
Pulls the newer reference image. |
terra-rstudio-anvil/CHECK/chk4 |
Inspects the newer image environment. |
terra-rstudio-anvil/CHECK/o4 |
Stores reference inspection output. |
terra-rstudio-anvil/scripts/bin/install2.r |
Installs R packages from the command line. |
terra-rstudio-anvil/scripts/config_R_cuda.sh |
Configures CUDA for R. |
terra-rstudio-anvil/scripts/default_user.sh |
Creates the default RStudio user. |
terra-rstudio-anvil/scripts/experimental/batch_user_creation.sh |
Creates multiple RStudio users. |
terra-rstudio-anvil/scripts/experimental/cuda10.2-tf.sh |
Adds experimental TensorFlow CUDA dependencies. |
terra-rstudio-anvil/scripts/experimental/install_R_binary.sh |
Installs experimental binary R. |
terra-rstudio-anvil/scripts/experimental/install_dev_osgeo.sh |
Builds development OSGeo libraries. |
terra-rstudio-anvil/scripts/experimental/install_geospatial_unstable.sh |
Enables unstable geospatial packages. |
terra-rstudio-anvil/scripts/experimental/install_rl.sh |
Adds reinforcement-learning packages. |
terra-rstudio-anvil/scripts/init_set_env.sh |
Propagates selected runtime variables. |
terra-rstudio-anvil/scripts/init_userconf.sh |
Configures the runtime user. |
terra-rstudio-anvil/scripts/install_R_ppa.sh |
Installs R from a CRAN repository. |
terra-rstudio-anvil/scripts/install_R_source.sh |
Builds R from source. |
terra-rstudio-anvil/scripts/install_cuda-10.1.sh |
Installs CUDA 10.1. |
terra-rstudio-anvil/scripts/install_cuda-11.1.sh |
Installs CUDA 11.1. |
terra-rstudio-anvil/scripts/install_geospatial.sh |
Installs geospatial dependencies. |
terra-rstudio-anvil/scripts/install_julia.sh |
Installs Julia and R integrations. |
terra-rstudio-anvil/scripts/install_jupyter.sh |
Installs Jupyter and an R kernel. |
terra-rstudio-anvil/scripts/install_nvtop.sh |
Builds the GPU monitor. |
terra-rstudio-anvil/scripts/install_pandoc.sh |
Installs or links Pandoc. |
terra-rstudio-anvil/scripts/install_pyenv.sh |
Installs pyenv and pipenv. |
terra-rstudio-anvil/scripts/install_python.sh |
Creates the shared Python environment. |
terra-rstudio-anvil/scripts/install_quarto.sh |
Installs or links Quarto. |
terra-rstudio-anvil/scripts/install_rstudio.sh |
Installs and configures RStudio Server. |
terra-rstudio-anvil/scripts/install_s6init.sh |
Installs the S6 supervisor. |
terra-rstudio-anvil/scripts/install_shiny_server.sh |
Installs Shiny Server. |
terra-rstudio-anvil/scripts/install_tensorflow.sh |
Adds R TensorFlow tooling. |
terra-rstudio-anvil/scripts/install_texlive.sh |
Installs TeX Live. |
terra-rstudio-anvil/scripts/install_tf1_cuda_10_0.sh |
Adds TensorFlow 1 CUDA libraries. |
terra-rstudio-anvil/scripts/install_tidyverse.sh |
Installs tidyverse packages. |
terra-rstudio-anvil/scripts/install_verse.sh |
Adds publishing and development tools. |
terra-rstudio-anvil/scripts/install_wgrib2.sh |
Builds the GRIB utility. |
terra-rstudio-anvil/scripts/rsession.sh |
Launches a standalone R session. |
terra-rstudio-anvil/scripts/setup_R.sh |
Configures R and littler. |
terra-rstudio-anvil/scripts/tests/examples_tf.R |
Exercises an MNIST Keras model. |
terra-rstudio-anvil/scripts/tests/nvblas.R |
Exercises CUDA-backed BLAS. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| echo "rsession-which-r=${R_BIN}" > /etc/rstudio/rserver.conf | ||
| ## use more robust file locking to avoid errors when using shared volumes: | ||
| echo "lock-type=advisory" >> /etc/rstudio/file-locks | ||
| echo "auth-none=1" >> /etc/rstudio/rserver.conf |
| @@ -0,0 +1,47 @@ | |||
| # check=skip=SecretsUsedInArgOrEnv | |||
| FROM us.gcr.io/broad-dsp-gcr-public/terra-base:1.0.1 | |||
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} |
| GEOS_VERSION=${GEOS_VERSION:-"latest"} | ||
|
|
||
| CRAN_SOURCE=${CRAN_SOURCE:-"https://cloud.r-project.org"} | ||
| echo "options(repos = c(CRAN = '${CRAN}'))" >>"${R_HOME}/etc/Rprofile.site" |
| done | ||
|
|
||
| ## 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
+3
to
+7
| R_DOC_DIR=$R_HOME/doc | ||
| R_INCLUDE_DIR=$R_HOME/include | ||
| R_SHARE_DIR=$R_HOME/share | ||
| RSTUDIO_DEFAULT_R_VERSION_HOME=$R_HOME | ||
| RSTUDIO_DEFAULT_R_VERSION=$R_VERSION |
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.


the terra-rstudio-anvil folder includes a Dockerfile defining a container that works with current Rstudio and R 4.6.1. In May the various stacks did not align, and Rstudio started in a crippled state. Updates in various parts of the stack seem to have resolved the problem.