Skip to content

Commit

Permalink
Change to better image
Browse files Browse the repository at this point in the history
  • Loading branch information
aaabbb committed Nov 15, 2024
1 parent c57c5a5 commit da54a30
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
31 changes: 12 additions & 19 deletions devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
{
"name": "Data Science (Python and R)",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"image": "quay.io/jupyter/r-notebook:latest",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "latest"
},
"ghcr.io/rocker-org/devcontainer-features/r-apt:latest": {
"ghcr.io/h4rvey-g/rocker-devcontainer-features/r-apt:latest": {
"vscodeRSupport": "full",
"installDevTools": true,
"installRadian": true,
"installRMarkdown": true,
"installVscDebugger": true,
"installJupyterlab": true
},
"ghcr.io/h4rvey-g/rocker-devcontainer-features/apt-packages:1": {
"packages": "r-cran-data.table,r-cran-tidyverse",
"upgradePackages": true
},
// "ghcr.io/rocker-org/devcontainer-features/miniforge:1": {},
"installVscDebugger": true
}
// "ghcr.io/h4rvey-g/rocker-devcontainer-features/apt-packages:1": {
// "packages": "r-cran-data.table,r-cran-tidyverse",
// "upgradePackages": true
// },
// "ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
// "packages": "rliger,Seurat,qs,targets"
// }
},
"shutdownAction": "none",
"overrideFeatureInstallOrder": [
"ghcr.io/rocker-org/devcontainer-features/r-apt"
],
// "overrideFeatureInstallOrder": [
// "ghcr.io/rocker-org/devcontainer-features/r-apt"
// ],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/bin/bash ./.devcontainer/postCreateCommand.sh",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down Expand Up @@ -68,5 +61,5 @@
}
},
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
"remoteUser": "jovyan"
}
12 changes: 5 additions & 7 deletions postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
pip install ipykernel ipywidgets

if [ -f requirements.txt* ]; then
pip install -r requirements.txt
else pip install pandas numpy matplotlib seaborn scikit-learn; fi
# if [ -f requirements.txt* ]; then
# pip install -r requirements.txt
# else pip install pandas numpy matplotlib seaborn scikit-learn; fi
# fix permission issue
sudo chmod 777 /usr/local/lib/R/site-library/_cache/
# sudo chmod 777 /usr/local/lib/R/site-library/_cache/
# enable vscode R support
echo 'if (interactive() && Sys.getenv("RSTUDIO") == "") {
source(file.path(Sys.getenv(if (.Platform$OS.type == "windows") "USERPROFILE" else "HOME"), ".vscode-R", "init.R"))
Expand All @@ -24,4 +22,4 @@ touch ~/.lintr
echo 'linters: linters_with_defaults(
line_length_linter(120),
commented_code_linter = NULL
)' >>~/.lintr
)' >>~/.lintr

0 comments on commit da54a30

Please sign in to comment.