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

Install R-Packages with version lock #405

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions rstudio/c9s-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ 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/src/Rpackages/4.3 && chmod -R a+w /opt/app-root/src/Rpackages/4.3
ENV R_LIBS_USER /opt/app-root/src/Rpackages/4.3
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

WORKDIR /tmp/

Expand All @@ -50,9 +50,17 @@ COPY rsession.conf /etc/rstudio/rsession.conf
# package installation
RUN dnf install -y libsodium-devel.x86_64 libgit2-devel.x86_64 libcurl-devel harfbuzz-devel.x86_64 fribidi-devel.x86_64 cmake "flexiblas-*" \
&& dnf clean all && rm -rf /var/cache/yum
RUN R -e "install.packages('Rcpp')"
Copy link
Member

Choose a reason for hiding this comment

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

Why this line is been deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have decided to add it to the install.versions to be able to version lock this package.

Copy link
Member

Choose a reason for hiding this comment

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

Have in mind this should be installed before any other package


# Install NGINX to proxy RStudio and pass probes check
# Install R packages
RUN R -e "install.packages('remotes')"
RUN R -e "require('remotes'); \
remotes::install_version('Rcpp','1.0.12'); \
remotes::install_version('tidyverse','2.0.0'); \
remotes::install_version('tidymodels','1.1.1'); \
remotes::install_version('plumber','1.2.1'); \
remotes::install_version('vetiver','0.2.5'); \
remotes::install_version('devtools','2.4.5');"

# Install NGINX to proxy RStudio and pass probes check
ENV NGINX_VERSION=1.24 \
NGINX_SHORT_VER=124 \
NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \
Expand Down
2 changes: 1 addition & 1 deletion rstudio/c9s-python-3.9/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi

# Create lib folders if it does not exist
mkdir -p /opt/app-root/src/Rpackages/4.3

cp -r /opt/app-root/bin/Rpackages/4.3/* /opt/app-root/src/Rpackages/4.3/
# rstudio terminal cant see environment variables set by the container runtime
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
env | grep KUBERNETES_ >> /usr/lib64/R/etc/Renviron.site
Expand Down