Closed kleinlennart closed 8 months ago
Added R devcontainer bdb650aa2e9a41870ec86c71375ba5196cc210cb
@davidpomerenke's wishlist:
"ms-python.python",
"ms-toolsai.jupyter",
"charliermarsh.ruff",
"tamasfe.even-better-toml",
"visualstudioexptteam.vscodeintellicode",
"mhutchie.git-graph",
"sandcastle.vscode-open",
"ms-vscode-remote.vscode-remote-extensionpack",
"ms-vsliveshare.vsliveshare",
"github.copilot",
"github.copilot-chat"
Use ubuntu:jammy
as base image?
I've set up all Python stuff and some extensions and settings in https://github.com/SocialChangeLab/media-impact-monitor/commit/8137a4c3937182d04d60683afb8c129d1fc14ad4
However for setting up a custom Dockerfile, I had to remove the reference to the original Dockerfile (ghcr.io/rocker-org/devcontainer/tidyverse:4.3) I'm not sure how we would best bring its functionality back. I looked up the source of that image and traced it back a few steps, and what it essentially does is execute these two scripts:
For the first one of these, there is also an alternative script: https://github.com/rocker-org/rocker-versioned2/blob/master/scripts/install_R_ppa.sh
We could probably simplify this by just using the official installation instructions: https://cran.r-project.org/bin/linux/ubuntu/fullREADME.html
Or maybe there is some devcontainer-feature that installs R itself?
Nice! Don't worry about the rocker image, I will get it to work again. Probably nicer to have a lightweight R installation anyways. Most R packages can be installed via apt-get on Ubuntu and there is also a devcontainer-feature for it that automatically installs all system dependencies as well. Probably improves container build times if I add this to the devcontainer and not the Dockerfile so we don't have to do a Full Rebuild for every new R package. But I will probably use renv for dependency management anyway.
Is there a specific reason why you added the Dockerfile to the main folder instead of .devontainer?
No reason, I changed it now 👍 https://github.com/SocialChangeLab/media-impact-monitor/commit/318f61f8a492001a6e989721adb91205ed7f5408
Currently testing a dockerfile with the rocker install scripts (the devcontainer feature didn't do a good job setting up all the ENV variables for R). However, the container build takes a loong time now :(
Yeah ... did it use to be better with the previous setup?
That setup probably used a pre-built container, and then the devcontainer-features ran some minor additions on top of that basis; whereas now all the stuff might be run from scratch ...
I've setup everything using devcontainer-features again.
The only thing that does not work is installing packages like this:
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
"packages": [
"easystats"
],
"installSystemRequirements": true
},
This gives some (package-specific?) error. I'll make a separate issue for that.
Can you check whether the Devcontainer works for you, and whether you're missing anything? @kleinlennart @vogelino
Issue for the R packages problem: #9
Closed with #19
@davidpomerenke's recommended Python environment:
@kleinlennart likes to use a custom R container based on rocker:
@vogelino needs?