-
Notifications
You must be signed in to change notification settings - Fork 184
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
Update some scripts to install R packages from source, on arm64 images #195
Conversation
Out of curiousity do you know if anybody has said anything about such arm64 binaries? |
Sorry, I don't know. I looked into the architectures supported by RSPM and couldn't find any mention of arm64. As you told me in #153 (comment), there is currently no RStudio or even R binary in arm64 Ubuntu, so I'm convinced that's why RSPM doesn't provide arm64 binaries. |
@eitsupi nice work, this approach makes sense. Thanks for testing; I don't have access to any arm64 architectures and am not really up to speed on the details of multi-arch Docker -- is there a convenient way to have these images pre-build the arm64 versions, e.g. an arm64-based GH-Actions runner? |
@cboettig Multi-arch images can be built using the If you want to build a multi-arch image with GitHubActions, it is easy to use For example, here is a multi-arch image that I ran
As described above, it is not that difficult to build a multi-arch image nowadays, but there are two disadvantages compared to the current amd64-only build.
I submitted this PR because I figured out how to support arm64 images, but I don't think there is much need to do multi-arch builds of By the way, I am testing the arm64 image on Ubuntu installed on a Raspberry Pi 4😂 |
Excellent, thanks for this. Right, certainly the builds from source are quite slow, but then that's why it would be nice to have pre-built images available to users. Meanwhile, seems like we can go ahead an merge this anyway. Yup, hopefully buildx will support the compose-like depends-on option which would fit better into the current workflow, though it wouldn't be too difficult to work around that with a Makefile or similar. |
@eitsupi Why not use a Mac mini M1 😉. There are also [less invasive] alternatives to GitHub for CI/CD. |
@cboettig Thank you for merging.
Yes, moving to using buildx seems to be a good idea to consider. The ability to set multiple tags is also very attractive. For example, I heard that if you build the following {
"target": {
"r-ver": {
"context": "../",
"dockerfile": "dockerfiles/Dockerfile_r-ver_4.1.0",
"tags": [
"docker.io/rocker/r-ver:4.1.0",
"docker.io/rocker/r-ver:4.1",
"docker.io/rocker/r-ver:4",
"docker.io/rocker/r-ver:latest"
],
"platforms": [
"linux/amd64",
"linux/arm64"
]
}
}
} It seems to make sense to proceed with the creation of a script to generate @benz0li Thanks for the information! The performance of the M1 chip is really amazing. |
Related to #144
The RSPM CRAN mirrors does not provide arm64 binary packages for ubuntu at this time.
So, in this PR, I will modify the rocker script so that the R package will do source installations in the arm64 images.
install_R.sh
: Change the default repository to be written toRprofile.site
to source in arm64 images.install_tidyverse.sh
andinstall_verse.sh
: Remove the reference to the CRAN env var from the options of theinstall2.r
command for to use the default repository. (In other scripts originally did not reference the CRAN env var from theinstall2.r
-r
option.)With these fixes, I have run
install_R.sh
on theubuntu:forcal
arm64 image, andinstall_tidyverse.sh
on it, and confirmed that I can use R normally.