Comments (10)
Hi @jefflab
I am aware of this, and yes the bits you referred to from the compile script were removed intentionally since it wasn't doing anything and I wanted to "clean up" the script.
I haven't had time to implement the caching features yet. If you are able to give it a go it would be much appreciated.
Thanks for your feedback.
from heroku-buildpack-r.
Thanks for clarifying! My intention is to "give it a go" in the next week or so.
If there are any "lessons learned" that you'd like me to keep in mind, please send them my way.
from heroku-buildpack-r.
Sorry for the delayed response. I finally got around to working on this today.
The following things informed my solution:
- The cran output during my deploy was from libraries being installed
- The Buildpack API documentation states that
CACHE_DIR
is not intended for large amounts of data (it is meant to be used for resolved dependency files) - Binary dependencies should be compiled with
heroku run
because Vulcan is deprecated - It seems that best practice is to store compiled binaries on S3 and then copy them over during deploy
- This article describes using a
.vendor_urls
file to tell the custom buildpack which binaries need to be installed
Based on the above information, I came up with the following proposed solution:
https://github.com/jefflab/heroku-buildpack-r/commit/cdc88316f097122a0157faf0e35f335de9d08420
To add library dependencies, the steps are:
- Install the libraries manually using
heroku run
- Use
tar -czvf
to capture the library binaries with the appropriate path - Upload the tar.gz to S3
- Add the S3 url to a file called
.vendor_urls
in their project
If you think a solution like this should be added to the project let me know. I'll write up better documentation and create a pull request
from heroku-buildpack-r.
@jefflab @virtualstaticvoid What ever happened to this solution?
I agree that having some sort of caching would be really helpful to speed up Heroku deployments.
from heroku-buildpack-r.
@andrewmatthewthompson I never got around to build the generic solution. Instead I just ended up directly copying the binaries I needed in a separate build pack.
from heroku-buildpack-r.
Okay thanks for the update @jefflab.
On a complete aside do you know what the build_with_heroku
command is on this page (i.e. how does that command end up installed somewhere so you can use it to build a customer version of R): https://github.com/virtualstaticvoid/heroku-buildpack-r/blob/master/support/README.md
from heroku-buildpack-r.
@andrewmatthewthompson My understanding is that build_with_heroku
just refers to this script:
https://github.com/virtualstaticvoid/heroku-buildpack-r/blob/master/support/build_with_heroku
You don't have to install it or anything. I never tried to run this script directly, but I used it as an example for how to compile binaries and get them on S3. Took a bit of trial and error for me to get it working. Good luck.
from heroku-buildpack-r.
The build_with_heroku
script and others are used for compiling the R binaries which are then packaged in the buildpack archive. When you push your application code to Heroku, this buildpack archive is fetched from S3 and extracted into your slug. It is possible to cache the extracted archive, so that deploys are faster, but this hasn't been implemented yet.
Also, you can include additional R CRAN packages to be installed in the init.r
file, and it would be beneficial to cache these too.
For cedar-14
, I've extracted these scripts into their own repository.
from heroku-buildpack-r.
Another aspect of the caching is for when additional packages are installed, as part of the deploy, that there outputs get cached. I.e. The slow part is compiling these packages to include in the slug.
Perhaps the title of this issue should rather be "Not caching additional installed packages between deploys".
from heroku-buildpack-r.
from heroku-buildpack-r.
Related Issues (20)
- I would really appreciate a walkthrough for a regular R user HOT 3
- renv 12 in my renv.lock file breaks the 'compilation' HOT 5
- GPG error HOT 3
- Rplumber test application delivers error HOT 5
- Increasing timeout HOT 1
- Support heroku-20 stack HOT 1
- Building with dokku HOT 2
- IsoSpecR not installed
- Skip BUILD_DIR to /app rsync when building in /app
- There is no package called 'renv' HOT 2
- Multiple-app hosting unavailable HOT 6
- Timeout when installing HOT 3
- Slow build time - Caching issue? HOT 2
- Authentication/Browser Problem when deployed. HOT 7
- Add Support for Heroku-22 HOT 9
- Add telegram.bot example and default packages HOT 6
- Use reticulate package HOT 1
- Aptfile installation fails HOT 1
- Could I use cloud native build packs? HOT 2
- renv 1.0.2 Error in if (n == 1) word else paste(word, "s", sep = ""): app[web.1]: the condition has length > 1 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-r.