Skip to content

Commit

Permalink
Merge pull request #5555 from berkeley-dsep-infra/staging
Browse files Browse the repository at this point in the history
Merge #5552, #5554.
  • Loading branch information
ryanlovett authored Feb 22, 2024
2 parents 5aee3b6 + a805673 commit 90bd88f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 3 additions & 1 deletion deployments/datahub/images/default/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ RUN curl --silent --location --fail ${SHINY_SERVER_URL} > /tmp/shiny-server.deb
apt install --no-install-recommends --yes /tmp/shiny-server.deb && \
rm /tmp/shiny-server.deb

# Set CRAN mirror to rspm before we install anything
# Install our custom Rprofile.site file
COPY Rprofile.site /usr/lib/R/etc/Rprofile.site
# Create directory for additional R/RStudio setup code
RUN mkdir /etc/R/Rprofile.site.d
# RStudio needs its own config
COPY rsession.conf /etc/rstudio/rsession.conf

Expand Down
19 changes: 18 additions & 1 deletion deployments/datahub/images/default/Rprofile.site
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,21 @@ options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/jammy
# below sets it to be binary. This may improve image build times.
# If it works, it'd be better to dynamically set the R version as above, and
# also the RStudio Server version if possible.
options(HTTPUserAgent = "RStudio Server (2021.9.1.372); R (4.3.1 x86_64-pc-linux-gnu x86_64 linux-gnu)")
options(HTTPUserAgent = "RStudio Server (2023.12.0.369); R (4.3.2 x86_64-pc-linux-gnu x86_64 linux-gnu)")


## Source extra Rprofile files.
#
# This lets us easily add new code via extraFiles (or other z2jh-related
# magic) without having to rebuild the image each time.

# Get a list of files in the directory
rprofile_dir <- "/etc/R/Rprofile.site.d/"
rprofile_files <- list.files(rprofile_dir, full.names = TRUE)

# Source each file
for (rprofile_file in rprofile_files) {
cat("Sourcing:", rprofile_file, "\n")
source(rprofile_file)
}

0 comments on commit 90bd88f

Please sign in to comment.