Skip to content
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

A template for rstudio-server? #23

Closed
eitsupi opened this issue Aug 11, 2023 · 4 comments · Fixed by #25
Closed

A template for rstudio-server? #23

eitsupi opened this issue Aug 11, 2023 · 4 comments · Fixed by #25
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@eitsupi
Copy link
Member

eitsupi commented Aug 11, 2023

PS. Might be worth thinking of a sister r2u+RStudio template, as that's come up a few times on social media since I posted my example repo.

Originally posted by @grantmcdermott in #19 (comment)

@eitsupi
Copy link
Member Author

eitsupi commented Aug 11, 2023

I tried the following (the existing r2u template with the new rstudio-server Feature added) on my own computer with VS Code Dev Containers, but when I run install.packages("curl") on RStudio, the installation seems to stop at the ading state information step.

{
	"name": "R (r2u and bspm configured)",
	"build": {
		"dockerfile": "Dockerfile"
	},
	"features": {
		"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
			"vscodeRSupport": "full",
			"installDevTools": true,
			"installRMarkdown": true,
			"installRadian": true,
			"installVscDebugger": true,
			"installBspm": true,
		},
		"ghcr.io/rocker-org/devcontainer-features/rstudio-server:0": {}
	},

	"customizations": {
		"vscode": {
			"extensions": [
				"RDebugger.r-debugger"
			],
			"settings": {
				"r.rterm.linux": "/usr/local/bin/radian",
				"r.bracketedPaste": true,
				"r.plot.useHttpgd": true
			}
		}
	},
	"postCreateCommand": {
		"rstudio-start": "rserver"
	},
	"forwardPorts": [
		8787
	]
}

image

Edit: I have created an issue (rocker-org/devcontainer-features#176)

@eitsupi
Copy link
Member Author

eitsupi commented Aug 11, 2023

It also does not seem to work well on Codespaces. (grantmcdermott/codespaces-r2u#5)

image

Thus, the installation stopped in the middle of the installation process.

If I run the same command in another process on VS Code, I get the following:

> install.packages("curl")
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
Error: E:Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1776 (bspm.py), W:Be aware that removing the lock file is not a solution and may break your system., E:Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

@eddelbuettel
Copy link
Member

What do have in Dockerfile? In what I (and Grant) now use for 'codespace with r2u' we are just using base/jammy with your r-apt codespace feature.

@eitsupi
Copy link
Member Author

eitsupi commented Aug 11, 2023

What do have in Dockerfile? In what I (and Grant) now use for 'codespace with r2u' we are just using base/jammy with your r-apt codespace feature.

This is that.

FROM --platform=linux/amd64 mcr.microsoft.com/devcontainers/base:${templateOption:imageVariant}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants