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

Conversation

dibryant
Copy link
Contributor

@dibryant dibryant commented Feb 6, 2024

fixes for https://issues.redhat.com/browse/RHOAIENG-2799

Description

Added R packages with fixed version lock

How Has This Been Tested?

Use either the image build in the PR or built from this commit:

git checkout dibryant:rs-packages

cd rstudio/c9s-python-3.9/
podman build -t rstudio . --build-arg BASE_IMAGE=quay.io/opendatahub/workbench-images:base-c9s-python-3.9-20240124

And the run the image in local or directly in cluster

podman run -p 8787:8787 quay.io/opendatahub/workbench-images:rstudio-c9s-python-3.9-pr-405

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@dibryant
Copy link
Contributor Author

dibryant commented Feb 6, 2024

/retest

@dibryant dibryant force-pushed the rs-packages branch 6 times, most recently from d5cd2fd to 01e400d Compare February 13, 2024 17:11
@dibryant dibryant force-pushed the rs-packages branch 2 times, most recently from 901af23 to b138ce0 Compare February 15, 2024 05:54
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

Missed this PR for review.
Took a quick look.
this is missing the ARG
which this the variable $NEEDPACKAGE cant be used.
please include it .

will look thoroughly over this.

rstudio/c9s-python-3.9/Dockerfile Outdated Show resolved Hide resolved
@dibryant dibryant changed the title Option to install R core package in R-Studio Build Install R-Packages Feb 29, 2024
@dibryant
Copy link
Contributor Author

dibryant commented Mar 5, 2024

/retest-required

Copy link
Member

@atheo89 atheo89 left a comment

Choose a reason for hiding this comment

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

I was able to build with or without the extra packages.
Added some minor enhancements, about the dockerfile syntax

@dibryant dibryant force-pushed the rs-packages branch 12 times, most recently from e91b91c to 16a9c6a Compare March 29, 2024 13:24
@atheo89
Copy link
Member

atheo89 commented Mar 29, 2024

I've noticed that during the image building process, you can observe the packages being installed. However, upon completion, when you spin up the notebook, the installed packages are mysteriously absent.

@@ -50,9 +50,12 @@ 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

' Outdated
@@ -0,0 +1,24 @@
# This is a combination of 2 commits.
Copy link
Member

Choose a reason for hiding this comment

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

this file was probably added (and also created) by some mistake; it should be removed from PR?

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

Following changes are needed:

rstudio/c9s-python-3.9/Dockerfile Outdated Show resolved Hide resolved
@harshad16
Copy link
Member

I've noticed that during the image building process, you can observe the packages being installed. However, upon completion, when you spin up the notebook, the installed packages are mysteriously absent.

This is happening due the R_LIBS_USER is set to /opt/app-root/src/Rpackages/4.3
https://github.com/opendatahub-io/notebooks/blob/c0355fcd489a87c2293ea9adf1c73f8bfc4c2aa5/rstudio/c9s-python-3.9/Dockerfile#L35C17-L35C48

as the /opt/app-root/src is overwritten during the runtime, by the PVC that is attached to the Workbenches
all the present content is overwritten.

@dibryant please make this change
we should move this to a new path:
/opt/app-root/src/Rpackages/4.3 -> /opt/app-root/bin/Rpackages/4.3
https://github.com/opendatahub-io/notebooks/blob/main/rstudio/c9s-python-3.9/Dockerfile#L34-L35

@dibryant
Copy link
Contributor Author

dibryant commented Apr 1, 2024

/retest-required

@harshad16
Copy link
Member

Seems like following additional changes are required at this:


cp -r /opt/app-root/bin/Rpackages/4.3/* /opt/app-root/src/Rpackages/4.3/

as the during the runtime R_LIBS_USER is set to: /opt/app-root/src/Rpackages/4.3

@atheo89
Copy link
Member

atheo89 commented Apr 2, 2024

as the /opt/app-root/src is overwritten during the runtime, by the PVC that is attached to the Workbenches all the present content is overwritten.

Right, the same situation occurred with code-server extensions, leading us to include their installation in the startup .sh script.

Copy link
Contributor

openshift-ci bot commented Apr 3, 2024

@dibryant: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/notebook-jupyter-intel-pyt-ubi9-python-3-9-pr-image-mirror a294343 link true /test notebook-jupyter-intel-pyt-ubi9-python-3-9-pr-image-mirror
ci/prow/runtime-intel-pyt-ubi9-python-3-9-pr-image-mirror a294343 link true /test runtime-intel-pyt-ubi9-python-3-9-pr-image-mirror
ci/prow/runtime-intel-tf-ubi9-python-3-9-pr-image-mirror a294343 link true /test runtime-intel-tf-ubi9-python-3-9-pr-image-mirror
ci/prow/notebook-jupyter-intel-tf-ubi9-python-3-9-pr-image-mirror a294343 link true /test notebook-jupyter-intel-tf-ubi9-python-3-9-pr-image-mirror
ci/prow/runtime-intel-ml-ubi9-python-3-9-pr-image-mirror a294343 link true /test runtime-intel-ml-ubi9-python-3-9-pr-image-mirror
ci/prow/notebook-jupyter-intel-ml-ubi9-python-3-9-pr-image-mirror a294343 link true /test notebook-jupyter-intel-ml-ubi9-python-3-9-pr-image-mirror
ci/prow/notebooks-e2e-tests 8a403d6 link true /test notebooks-e2e-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@harshad16
Copy link
Member

Screenshot from 2024-04-03 12-31-41

Test this in a cluster.
Seems like it works as expected 💯
Thanks for the awesome.

/lgtm
/approve
🎖️

@openshift-ci openshift-ci bot added the lgtm label Apr 3, 2024
Copy link
Contributor

openshift-ci bot commented Apr 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harshad16

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Apr 3, 2024
@harshad16 harshad16 merged commit 1efd888 into opendatahub-io:main Apr 3, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants