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

Add install_requirements.r #6806

Closed
wants to merge 1 commit into from
Closed

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Mar 14, 2022

This PR is a part of #6505

Now our tunnel experiments are broken because:

R version 4.0.4 (2021-02-15) -- "Lost Library Book"

> library(ggplot2)
Error: package or namespace load failed forggplot2’:
 packageggplot2was installed before R 4.0.0: please re-install it
Execution halted

See full console output

The last successful build is: https://jenkins-ci.tribler.org/job/tunnel_experiments/job/speed_test_exit/177/ and regarding it's console output it has been run under R version 3.5.2

R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"

So, to fix the run we have just to install the following packages:

library(ggplot2)
library(reshape2)

But this error could happen again when the R version has been updated.

I propose to use the file install_requirements.r to automatically install all the necessary dependencies.

ref: https://datatofish.com/install-package-r/

@drew2a drew2a requested a review from kozlovsky March 14, 2022 16:05
@drew2a drew2a marked this pull request as ready for review March 14, 2022 16:05
@drew2a drew2a requested a review from a team March 14, 2022 16:05
@drew2a drew2a force-pushed the refactoring/add_requirements_for_r branch from d8d7812 to b3e24dc Compare March 14, 2022 16:07
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@drew2a drew2a marked this pull request as draft March 15, 2022 09:34
@drew2a
Copy link
Contributor Author

drew2a commented Mar 15, 2022

I tried to execute Jenkins job with the following command:

R --no-save < $PWD/tribler/scripts/experiments/tunnel_community/install_requirements.r

and got this error:

> install.packages("ggplot2")
Installing package into/usr/local/lib/R/site-library’
(aslibis unspecified)
Warning in install.packages("ggplot2") :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in install.packages("ggplot2") : unable to install packages
Execution halted

References:

@drew2a
Copy link
Contributor Author

drew2a commented Mar 15, 2022

The execution of these commands also ends unsuccessfully:

export R_LIBS_USER=$R_LIBS_USER${R_LIBS_USER:+:}$HOME/R
R --no-save < $PWD/tribler/scripts/experiments/tunnel_community/install_requirements.r

@drew2a
Copy link
Contributor Author

drew2a commented Mar 15, 2022

@drew2a drew2a closed this Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant