|
1 | 1 | { |
2 | | - "name": "Unix tools, bioconda and RStudio", |
| 2 | + "name": "Unix tools, (bio)conda (miniforge) and R(Studio)", |
3 | 3 | // https://rocker-project.org/images/devcontainer/images.html |
4 | 4 | "image": "ghcr.io/rocker-org/devcontainer/tidyverse:4", |
| 5 | + // Base image could be modified to allow non-root user to start rstudio server |
| 6 | + // See https://github.com/rocker-org/rocker-versioned2/issues/592 |
| 7 | + // "build": { |
| 8 | + // "context": "../..", |
| 9 | + // "dockerfile": "Dockerfile" |
| 10 | + // }, |
| 11 | + // "remoteUser": "rstudio", |
| 12 | + // but this seems to fail. |
| 13 | + // Fortunately, the rocker environments seem to launch |
| 14 | + // a regular user bash session: https://github.com/rocker-org/rocker/wiki/managing-users-in-docker |
5 | 15 | "features": { |
6 | 16 | // https://github.com/rocker-org/devcontainer-features/blob/main/src/rstudio-server/README.md |
7 | | - // already pre-installed in tidyverse container - https://rocker-project.org/images/devcontainer/images.html#rstudio-server |
| 17 | + // RStudio is already pre-installed in tidyverse container - https://rocker-project.org/images/devcontainer/images.html#rstudio-server |
8 | 18 | "ghcr.io/rocker-org/devcontainer-features/rstudio-server:latest": {}, |
| 19 | + // https://github.com/rocker-org/devcontainer-features/tree/main/src/apt-packages |
| 20 | + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { |
| 21 | + "packages": "libglpk-dev,nano,vim,less,git,screen,tmux,wget,curl,colordiff,htop,tree,graphviz" // "libglpk-dev" is required for igraph |
| 22 | + }, |
9 | 23 | // https://github.com/rocker-org/devcontainer-features/blob/main/src/r-packages/README.md |
10 | 24 | "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { |
11 | | - "packages": "tidyverse,rmarkdown,BiocManager,shiny,shinythemes,markdown", |
| 25 | + "packages": "devtools,languageserver,tidyverse,rmarkdown,markdown,shiny,shinythemes,BiocManager,github::bahlolab/isoRelate,sjmisc,networkD3,igraph,RColorBrewer,viridis,vcfR,poppr,ggfortify", |
12 | 26 | "installSystemRequirements": true |
13 | 27 | }, |
14 | 28 | // https://github.com/rocker-org/devcontainer-features/blob/main/src/miniforge/README.md |
15 | | - "ghcr.io/rocker-org/devcontainer-features/miniforge:1": { |
| 29 | + "ghcr.io/rocker-org/devcontainer-features/miniforge:2": { |
16 | 30 | "version": "latest", |
17 | | - "variant": "Mambaforge" |
| 31 | + "variant": "Miniforge3" |
18 | 32 | } |
19 | 33 | // https://github.com/mamba-org/devcontainer-features/tree/main/src/micromamba |
20 | 34 | // "ghcr.io/mamba-org/devcontainer-features/micromamba:1": {} |
21 | 35 | }, |
22 | 36 | // Use 'postCreateCommand' to run commands after the container is created. |
23 | 37 | // "postStartCommand": "if [ -f environment.yml ]; then umask 0002 && /opt/conda/bin/mamba env update -n base -f environment.yml; fi", |
24 | | - "postCreateCommand": "/opt/conda/bin/mamba env update -n base -f environment.yml", |
| 38 | + // "postCreateCommand": "/opt/conda/bin/mamba env update -y -n base -f environment.yml", |
| 39 | + // Disabled because the postCreateCommand seems to interfer with the internal commands run |
| 40 | + // by the rocker image which set the R package repositories, and it becomes impossible |
| 41 | + // to use install.packages() afterwards, even when specifying a repository url. |
25 | 42 | "postAttachCommand": { |
26 | 43 | "rstudio-start": "rserver" |
27 | 44 | }, |
|
36 | 53 | "customizations": { |
37 | 54 | "vscode": { |
38 | 55 | "settings": { |
39 | | - "workbench.colorTheme": "Sonokai Maia", |
40 | 56 | "workbench.editor.highlightModifiedTabs": true, |
41 | 57 | "workbench.tree.renderIndentGuides": "always", |
| 58 | + "indentRainbow.lightIndicatorStyleLineWidth": 5, |
| 59 | + "indentRainbow.indicatorStyle": "light", |
42 | 60 | "workbench.editor.wrapTabs": true, |
43 | 61 | "explorer.compactFolders": false, |
44 | 62 | "files.eol": "\n", |
45 | 63 | "editor.wordWrap": "on", |
| 64 | + "editor.renderWhitespace": "trailing", |
46 | 65 | "editor.bracketPairColorization.enabled": true, |
47 | | - "indentRainbow.lightIndicatorStyleLineWidth": 5, |
48 | | - "indentRainbow.indicatorStyle": "light", |
49 | 66 | // "terminal.integrated.scrollback": 10000, |
50 | | - "editor.renderWhitespace": "trailing", |
51 | 67 | "files.trimFinalNewlines": true, |
52 | 68 | "files.trimTrailingWhitespace": true, |
53 | 69 | "editor.formatOnType": true, |
54 | 70 | "editor.formatOnSave": true, |
55 | 71 | }, |
56 | 72 | "extensions": [ |
57 | 73 | // bash extensions |
58 | | - "mads-hartmann.bash-ide-vscode", |
59 | 74 | "foxundermoon.shell-format", |
| 75 | + "mads-hartmann.bash-ide-vscode", |
60 | 76 | "timonwong.shellcheck", |
61 | 77 |
|
62 | 78 | // QoL |
63 | 79 | "streetsidesoftware.code-spell-checker", |
64 | 80 | "oderwat.indent-rainbow", |
65 | 81 | "mechatroner.rainbow-csv", |
66 | 82 | "ionutvmi.path-autocomplete", |
67 | | - "fabiospampinato.vscode-diff", |
68 | 83 |
|
69 | 84 | // R |
70 | 85 | "REditorSupport.r", |
| 86 | + "REditorSupport.r-syntax", |
71 | 87 |
|
72 | 88 | // general formatting |
73 | 89 | "esbenp.prettier-vscode", |
|
0 commit comments