grantmcdermott / codespaces-r2u

Minimal(ish) R codespaces environment
16 stars 4 forks source link

Dual apt list files #2

Closed grantmcdermott closed 1 year ago

grantmcdermott commented 1 year ago

From @eddelbuettel's comment in https://github.com/grantmcdermott/codespaces-r2u/issues/1#issuecomment-1666272339.

Yet we also have the dual list files. Two of these are from your Dockerfile, two of them are not so we may need to have a look at the other scriptlets that run:

r$> system("ls -ltr /etc/apt/sources.list.d/")
total 16
-rw-r--r-- 1 root root 129 Aug  4 23:23 cran.list
-rw-r--r-- 1 root root 127 Aug  4 23:23 r2u.list
-rw-r--r-- 1 root root  76 Aug  4 23:24 cran-ubuntu.list
-rw-r--r-- 1 root root  65 Aug  4 23:24 cranapt.list
eddelbuettel commented 1 year ago

The first two are you (using my r2u setup). The other two maybe from devcontainers also enabling r2u?

https://github.com/grantmcdermott/codespaces-r2u/blob/141d95f5aef83662658a01b5c0ac1be4bd14c980/.devcontainer/Dockerfile#L24-L32

grantmcdermott commented 1 year ago

Ah, good catch. Yes, I believe the r-apt feature that I am using here also calls in r2u. (@eitsupi can you confirm?) So, it's likely redundancy on my side. I need to head out but will take a closer look over the weekend.

eitsupi commented 1 year ago

Yes, there is absolutely no need to write a Dockerfile to use r2u. Look at this for example. https://github.com/microsoft/datascience-py-r/blob/e7372c78dbc6d0c59e6d9d32299d0b8d1c44e9ac/src/datascience-py-r/.devcontainer/devcontainer.json

However, the bspm configuration must be done after installing R yourself for now, so you must use postCreateCommand, etc.

I have opened a PR to add an option to do this with the r-apt Feature. rocker-org/devcontainer-features#169

grantmcdermott commented 1 year ago

Closed in https://github.com/grantmcdermott/codespaces-r2u/commit/7bbe63ac777ca8ad84f186f5329211187b8659d4