Skip to content

Commit

Permalink
Merge pull request #707 from harshad16/2024b-rstudio
Browse files Browse the repository at this point in the history
Upgrade R version to 4.4 for the 2024b
  • Loading branch information
openshift-merge-bot[bot] authored Sep 27, 2024
2 parents 48d5c50 + a8edc56 commit 4696945
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions rstudio/c9s-python-3.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LABEL name="odh-notebook-rstudio-server-c9s-python-3.11" \

USER 0

ENV R_VERSION=4.3.3
ENV R_VERSION=4.4.1

# Install R
RUN yum install -y yum-utils && \
Expand All @@ -31,15 +31,15 @@ RUN chmod -R a+w /usr/lib64/R/library
ENV LIBLOC /usr/lib64/R/library

# set User R Library path
RUN mkdir -p /opt/app-root/bin/Rpackages/4.3 && chmod -R a+w /opt/app-root/bin/Rpackages/4.3
ENV R_LIBS_USER /opt/app-root/bin/Rpackages/4.3
RUN mkdir -p /opt/app-root/bin/Rpackages/4.4 && chmod -R a+w /opt/app-root/bin/Rpackages/4.4
ENV R_LIBS_USER /opt/app-root/bin/Rpackages/4.4

WORKDIR /tmp/

# Install RStudio
RUN wget --progress=dot:giga https://download2.rstudio.org/server/rhel9/x86_64/rstudio-server-rhel-2023.12.1-402-x86_64.rpm && \
yum install -y rstudio-server-rhel-2023.12.1-402-x86_64.rpm && \
rm rstudio-server-rhel-2023.12.1-402-x86_64.rpm && \
RUN wget --progress=dot:giga https://download2.rstudio.org/server/rhel9/x86_64/rstudio-server-rhel-2024.04.2-764-x86_64.rpm && \
yum install -y rstudio-server-rhel-2024.04.2-764-x86_64.rpm && \
rm rstudio-server-rhel-2024.04.2-764-x86_64.rpm && \
yum -y clean all --enablerepo='*'

# Specific RStudio config and fixes
Expand All @@ -53,10 +53,10 @@ RUN dnf install -y libsodium-devel.x86_64 libgit2-devel.x86_64 libcurl-devel har
# Install R packages
RUN R -e "install.packages('remotes')"
RUN R -e "require('remotes'); \
remotes::install_version('Rcpp','1.0.12'); \
remotes::install_version('Rcpp','1.0.13'); \
remotes::install_version('tidyverse','2.0.0'); \
remotes::install_version('tidymodels','1.1.1'); \
remotes::install_version('plumber','1.2.1'); \
remotes::install_version('tidymodels','1.2.0'); \
remotes::install_version('plumber','1.2.2'); \
remotes::install_version('vetiver','0.2.5'); \
remotes::install_version('devtools','2.4.5');"

Expand Down
2 changes: 1 addition & 1 deletion rstudio/c9s-python-3.11/rsession.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Set library path
r-libs-user=/opt/app-root/src/Rpackages/4.3
r-libs-user=/opt/app-root/src/Rpackages/4.4
8 changes: 4 additions & 4 deletions rstudio/c9s-python-3.11/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ if [ ! -f "/opt/app-root/src/.bashrc" ]; then
fi

# Create lib folders if it does not exist
mkdir -p /opt/app-root/src/Rpackages/4.3
for package in /opt/app-root/bin/Rpackages/4.3/*/;
mkdir -p /opt/app-root/src/Rpackages/4.4
for package in /opt/app-root/bin/Rpackages/4.4/*/;
do
package_folder=$(basename "$package")
if [ ! -d "/opt/app-root/src/Rpackages/4.3/$package_folder" ]; then
cp -r /opt/app-root/bin/Rpackages/4.3/$package_folder /opt/app-root/src/Rpackages/4.3/
if [ ! -d "/opt/app-root/src/Rpackages/4.4/$package_folder" ]; then
cp -r /opt/app-root/bin/Rpackages/4.4/$package_folder /opt/app-root/src/Rpackages/4.4/
fi
done
# rstudio terminal cant see environment variables set by the container runtime
Expand Down

0 comments on commit 4696945

Please sign in to comment.