Skip to content

[r-apt]: installBspm option#169

Merged
eitsupi merged 9 commits intorocker-org:mainfrom
eitsupi:r-apt-bspm
Aug 5, 2023
Merged

[r-apt]: installBspm option#169
eitsupi merged 9 commits intorocker-org:mainfrom
eitsupi:r-apt-bspm

Conversation

@eitsupi
Copy link
Member

@eitsupi eitsupi commented Aug 4, 2023

Close #69

Add a new option to set up bspm.

@eitsupi
Copy link
Member Author

eitsupi commented Aug 4, 2023

Ubuntu works, but Debian failed.

https://github.com/rocker-org/devcontainer-features/actions/runs/5764083355/job/15627296306?pr=169#step:4:1346

🚀 Launched container.
>  containerId:          547014daa2f2ad5d6ace1ce498f1aa2e19c1002a397ee4b52588fcddb445eedd
Loading required package: utils
Tracing function "install.packages" in package "utils"
> install.packages("curl")
Error: 
Execution halted

@eitsupi
Copy link
Member Author

eitsupi commented Aug 5, 2023

@eddelbuettel After setting bspm, package installation fails only on Debian on CI as follows Do you have any idea about this?
I suspect it has something to do with a network error on CI, since it doesn't fail locally (edit: it means local manual execution, not the unit test command, the test command devcontainer features test -f r-apt --skip-autogenerated also fails on local).

(Currently connections to http://http.debian.net/debian/dists/testing/InRelease appears to be erratic)

> install.packages("curl")
Error: 
Execution halted

@eddelbuettel
Copy link
Member

Hm. Not sure I ever tried (because I always had a richer set of packages under Ubuntu). Might be a question for @Enchufa2 about why/how/where debian fails where ubuntu works.

@eitsupi eitsupi marked this pull request as ready for review August 5, 2023 04:54
@eitsupi
Copy link
Member Author

eitsupi commented Aug 5, 2023

Ok, we can merge this for now and fix bugs later....

@eitsupi eitsupi added enhancement New feature or request feature New feature of Dev Container Feature (Needs minor version up) and removed enhancement New feature or request labels Aug 5, 2023
@eitsupi eitsupi merged commit 6149004 into rocker-org:main Aug 5, 2023
@eitsupi eitsupi deleted the r-apt-bspm branch August 5, 2023 06:16
grantmcdermott added a commit to grantmcdermott/codespaces-r2u that referenced this pull request Aug 5, 2023
@Enchufa2
Copy link

Enchufa2 commented Aug 8, 2023

I'm catching up here. Is this still failing for Debian? Is there any recipe to reproduce this locally?

@eitsupi
Copy link
Member Author

eitsupi commented Aug 9, 2023

@Enchufa2 Thanks for looking at this!

I have confirmed that install.packages("curl") fails on R started by a non-root user (vscode) on an image built from devcontainer.json as shown below.

{
	"image": "mcr.microsoft.com/devcontainers/base:debian",
	"features": {
		"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
			"installBspm": true
		}
	}
}

image

This setup corresponds to the following script run with INSTALLBSPM=true.
https://github.com/rocker-org/devcontainer-features/blob/583387a2831c181905c571b306f3a976affbe5cb/src/r-apt/install.sh

Perhaps the script contains improper settings somewhere?

@eddelbuettel
Copy link
Member

On the other we have rocker/r-bspm:testing so it can work if set up correctly. Maybe you can narrow the script down, try say once with languageserver and other big extras and try the basics?

(I just rebuilt it, it was behind on the Debian bookwork release.)

edd@rob:~/git/rocker-bspm/testing(master)$ docker run --rm -ti rocker/r-bspm:testing bash
root@4aff13295bc8:/# apt update -qq                                                                                                                                                                                
107 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@4aff13295bc8:/# install.r digest
(loaded the methods namespace)
Loading required package: utils
Tracing function "install.packages" in package "utils"
Available system packages as root...
Install system packages as root...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading package lists... Done    
Building dependency tree... Done 
Reading state information... Done
Get:1 http://cdn-fastly.deb.debian.org/debian sid/main amd64 r-cran-digest amd64 0.6.33-1 [193 kB]                                                                                                                
Fetched 193 kB in 0s (0 B/s)                                                                                                                                                                                      
Selecting previously unselected package r-cran-digest.
(Reading database ... 18496 files and directories currently installed.)
Preparing to unpack .../r-cran-digest_0.6.33-1_amd64.deb ...
Unpacking r-cran-digest (0.6.33-1) ...
Setting up r-cran-digest (0.6.33-1) ...
root@4aff13295bc8:/# 

The Dockerfile is tiny: https://github.com/rocker-org/bspm/blob/master/testing/Dockerfile

@eitsupi
Copy link
Member Author

eitsupi commented Aug 9, 2023

Maybe you can narrow the script down, try say once with languageserver and other big extras and try the basics?

I am not sure I understand your point. I am trying a minimal setup on #169 (comment) and packages such as languageserver are irrelevant.

it can work if set up correctly.

I think the problem here includes the fact that the error messages seem unhelpful.

@eitsupi
Copy link
Member Author

eitsupi commented Aug 9, 2023

I have created a new issue about that #173

@eddelbuettel
Copy link
Member

I am not sure I understand your point.

I apologize for being unclear. What I meant was that the script you pointed @Enchufa2 at is 250+ lines long and complicated with many cases, and points like "On Debian, renv, languageserver and httpgd are not available via apt"

The script that works has one RUN statement, one apt call and minimal customization. I think debugging may work if you start from the smallest working base and proceed from there.

@eitsupi
Copy link
Member Author

eitsupi commented Aug 9, 2023

Yes, I know that setup is successful if I run a minimal number of commands (as I wrote here #169 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature of Dev Container Feature (Needs minor version up)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[r-apt] Option to set up bspm

4 participants