cloudfoundry / r-buildpack

Cloud Foundry buildpack for R
Apache License 2.0
9 stars 24 forks source link

tidyverse r-package #17

Closed rwaaijman closed 4 years ago

rwaaijman commented 4 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? Cloud foundry: 2.8.8-build 8 CF client: 6.23.0

What version of the buildpack you are using? 1.1.4

If you were attempting to accomplish a task, what was it you were attempting to do? install r-package tidyverse

What did you expect to happen? no errors when building app

What was the actual behavior? error when installing dependencies of tidyverse error message: one or more packages failed simpel.zip

Please confirm where necessary:

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/173008644

The labels on this github issue will be updated when the story is started.

fg-j commented 4 years ago

When I attempt to reproduce your issue by running cf push with the provided app, I get the following output:

Updating app simpel...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 1.34 KiB / 1.34 KiB [=================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Stopping app...

Staging app and tracing logs...
   Downloading r_buildpack...
   Downloaded r_buildpack
   Cell 58ed2316-f710-403f-a0b1-da688666e592 creating container for instance 64342f5b-4075-47b8-99d1-523c3d8b1fc6
   Cell 58ed2316-f710-403f-a0b1-da688666e592 successfully created container for instance 64342f5b-4075-47b8-99d1-523c3d8b1fc6
   Downloading build artifacts cache...
   Downloading app package...
   Downloaded app package (1.3K)
   Downloaded build artifacts cache (155.3M)
   -----> R Buildpack version 1.1.7
   -----> Supplying R
   -----> Installing r 3.5.2
          Copy [/tmp/cache/final/dependencies/a345353699cb48ea335420e44faeb18421698c75190bc575ef6740f1993c0183/r-v3.5.2-cflinuxfs3-146d3fc2.tgz]
          **WARNING** A newer version of r is available in this buildpack. Please adjust your app to use version 3.5.3 instead of version 3.5.2 as soon as possible. Old versions of r are only provided to assist in migrating to newer versions.
          **WARNING** r 3.5.x will no longer be available in new buildpacks released after 2019-03-11.
          See: https://developer.r-project.org/
   R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
   Copyright (C) 2018 The R Foundation for Statistical Computing
   Platform: x86_64-pc-linux-gnu (64-bit)
   R is free software and comes with ABSOLUTELY NO WARRANTY.
   You are welcome to redistribute it under certain conditions.
   Type 'license()' or 'licence()' for distribution details.
     Natural language support but running in an English locale
   R is a collaborative project with many contributors.
   Type 'contributors()' for more information and
   'citation()' on how to cite R or R packages in publications.
   Type 'demo()' for some demos, 'help()' for on-line help, or
   'help.start()' for an HTML browser interface to help.
   Type 'q()' to quit R.
   > install.packages(c("shiny", "tidyverse"), repos="http://s0hrep0001h.cbsp.nl/cran/", dependencies=TRUE, Ncpus=16)
   Warning: unable to access index for repository http://s0hrep0001h.cbsp.nl/cran/src/contrib:
     cannot open URL 'http://s0hrep0001h.cbsp.nl/cran/src/contrib/PACKAGES'
   Warning message:
   packages ‘shiny’, ‘tidyverse’ are not available (for R version 3.5.2)
   >
   >

For me, the buildpack is unable to reach the local CRAN repository: http://s0hrep0001h.cbsp.nl/cran. Are you facing the same issue? Please provide some of the log output from running cf push so that we can better diagnose the problem.

Also consider looking at the "Vendoring App Dependencies" section of the Cloud Foundry R Buildpack Documentation for a way of creating local CRAN-like repo.

kvedurmu commented 4 years ago

@floragj It looks like that cran_mirror in the attached application is behind firewall. I was able to reproduce this issue by changing the cran_mirror to https://cran.r-project.org.

@rwaaijman - you can use tidyverse in your application by using the Apt Buildpack along with the R Buildpack. Per the instructions here, you can define an apt.yml file, and modify your manifest.yml to push with both the Apt Buildpack and the R Buildpack. Note that Shiny is already provided by the buildpack, so it's not necessary to install in your r.yml.

apt.yml

---
truncatesources: true
cleancache: true
packages:
- libcurl4-openssl-dev
- libssl-dev
- libxml2-dev

manifest.yml

---
version: 1
applications:
- name: simpel      #naam app
  memory: 2G            #geheugen
  instances: 1          
  random-route: false
  buildpacks:
  - apt_buildpack       #installeren extra linux aps
  - r_buildpack         #installeren r en libraries
  command: R -f app.R       #starten R app

We will be making it easier to install additional packages in the next generation of the R Buildpack, the R Paketo Buildpack. Closing for now, but feel free to open back up if you run into any other issues.

rwaaijman commented 4 years ago

thanks!