-
Notifications
You must be signed in to change notification settings - Fork 74
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
Docker: use R installation manager #312
Conversation
Because HOME is mounted to something ephemeral on GitHub Actions.
Nice! This looks like a great idea to me, thanks so much. I'm just doing some local testing in Docker before I approve and merge. |
OK cool! If
But then you still have to manually set the p3m repositories. |
Hmmm. I'll take a look at how much Edit: Image size before this PR: 2.94GB. After: 4.69GB. However, using the |
The rstudio/r-builds R builds have a lot of dependencies that are not strictly required, e.g. compilers. The rig binary itself is less than 10MB AFAIR, and has no dependencies. You probably also want to delete the downloaded deb packages after |
Brill, thanks for confirming. 10MB is a bargain for the management tools rig itself provides. So, the cost is in using the rstudio R builds. I guess it's not so bad, and probably worth the extra GB (if you're already downloading 3GB in any case) to ensure we have a confirmed working native R of the right version. |
Hmm are you sure those numbers are correct? I would be surprised if the posit build of R has many more dependencies than the default ubuntu builds. I have the version from the above PR in my own ghcr.io, and the sizes* are uncompressed: # docker image ls ghcr.io/r-wasm/webr:main
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/r-wasm/webr main 3a13fe3601ba 5 days ago 2.94GB
# docker image ls ghcr.io/jeroen/webr:main
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/jeroen/webr main 8456fd927511 3 hours ago 3.17GB And compressed: dockersize() { docker manifest inspect -v "$1" | jq -c 'if type == "array" then .[] else . end' | jq -r '[ ( .Descriptor.platform | [ .os, .architecture, .variant, ."os.version" ] | del(..|nulls) | join("/") ), ( [ .SchemaV2Manifest.layers[].size ] | add ) ] | join(" ")' | numfmt --to iec --format '%.2f' --field 2 | column -t ; }
## jeroen@dev:~$ dockersize ghcr.io/r-wasm/webr:main
linux/amd64 1.07G
##jeroen@dev:~$ dockersize ghcr.io/jeroen/webr:main
linux/amd64 1.18G *scripts from here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! Here is how things look on my end:
Where the untagged images are with and without rig. Perhaps the difference is because I built those locally on arm macOS, rather than through GHA/Linux? I don't really see why that should be the case, though.
In any case, I'm happy to continue with using rig and RStudio's R builds. Other than a few minor suggestions, let's merge and see where things lie after CI catches up.
Thanks. I'm reverting the last commit that added |
Awesome. Going to trigger 40k rebuilds with this R-4.3.0 so that we don't get the |
Wow, that's a lot of packages! Good luck! |
Just out of curiosity, why are you not using R 4.3.2? |
Afaik, webr has not been ported yet to 4.3.2.
Op wo 8 nov. 2023 15:50 schreef Gábor Csárdi ***@***.***>:
… Just out of curiosity, why are you not using R 4.3.2?
—
Reply to this email directly, view it on GitHub
<#312 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZ7Z3XZXF6K5TCY3H2HLYDOL2FAVCNFSM6AAAAAA65TB6LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBSGA2DAOBYGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The current release of webR uses R 4.3.0 as the base source. I think using R 4.3.2 to build Wasm packages does work, but it shows a warning message when loading the resulting package in webR. As for the reason webR still uses R 4.3.0, it's because webR patches the source code to reimplement some of R's features using web browser APIs, and also makes some other changes for compatibility with the WebAssembly and Emscripten environment. From experience, when I update the version of the R source used the patches don't apply cleanly and need to be reworked. This has been a non-trivial amount of work in the past, so I don't focus too much on following every R patch release. Perhaps in the future, some of the patches can be upstreamed to R core to make the Wasm build process simpler. |
Switch the host R installation to use rig from @gaborcsardi.
This makes it much easier to pin the host installation to match the webr version (4.3.0 currently). Also it automatically sets up pak and PPM binaries, so I think this will much simplify management.