diff --git a/images/base/index.html b/images/base/index.html index 5383de7..bc8a856 100644 --- a/images/base/index.html +++ b/images/base/index.html @@ -308,7 +308,7 @@

r-base stack

-
+
-
+
+

There is also a repository that can be used to try Dev Containers on GitHub Codespaces immediately.

+

Check the source repository for details on each Feature.

diff --git a/images/devcontainer/images.html b/images/devcontainer/images.html index f7c2508..108bfd5 100644 --- a/images/devcontainer/images.html +++ b/images/devcontainer/images.html @@ -516,9 +516,8 @@

{
-    "name": "${localWorkspaceFolderBasename}",
-    "image": "ghcr.io/rocker-org/devcontainer/r-ver:4"
-}

+ "image": "ghcr.io/rocker-org/devcontainer/r-ver:4" +}

The basic usage is to customize by adding Dev Container Features here.

Or, we can use it as a base image in a Dockerfile.

@@ -535,11 +534,10 @@

{
-    "name": "${localWorkspaceFolderBasename}",
-    "build": {
-        "dockerfile": "Dockerfile"
-    }
-}

+ "build": { + "dockerfile": "Dockerfile" + } +}
diff --git a/images/devcontainer/index.html b/images/devcontainer/index.html index fe45b55..a51f854 100644 --- a/images/devcontainer/index.html +++ b/images/devcontainer/index.html @@ -308,7 +308,7 @@

Development Container Resources

-
+
-
+
-
+
diff --git a/images/other/index.html b/images/other/index.html index 1188f32..80729cd 100644 --- a/images/other/index.html +++ b/images/other/index.html @@ -308,7 +308,7 @@

Additional images

-
+
-
+
diff --git a/images/versioned/index.html b/images/versioned/index.html index a5d0103..3303a12 100644 --- a/images/versioned/index.html +++ b/images/versioned/index.html @@ -308,7 +308,7 @@

Version-stable Rocker images

-
+
-
+
-
+
-
+
-
+
diff --git a/listings.json b/listings.json index 6ad7b11..1938239 100644 --- a/listings.json +++ b/listings.json @@ -1,10 +1,9 @@ [ { - "listing": "/images/devcontainer/index.html", + "listing": "/images/other/index.html", "items": [ - "/images/devcontainer/features.html", - "/images/devcontainer/templates.html", - "/images/devcontainer/images.html" + "/images/other/r-bspm.html", + "/images/other/r-ubuntu.html" ] }, { @@ -14,6 +13,14 @@ "/images/base/r-devel.html" ] }, + { + "listing": "/images/devcontainer/index.html", + "items": [ + "/images/devcontainer/features.html", + "/images/devcontainer/templates.html", + "/images/devcontainer/images.html" + ] + }, { "listing": "/images/versioned/index.html", "items": [ @@ -24,13 +31,6 @@ "/images/versioned/shiny.html" ] }, - { - "listing": "/images/other/index.html", - "items": [ - "/images/other/r-bspm.html", - "/images/other/r-ubuntu.html" - ] - }, { "listing": "/use/index.html", "items": [ diff --git a/search.json b/search.json index c37e008..097be4d 100644 --- a/search.json +++ b/search.json @@ -1,24 +1,108 @@ [ { - "objectID": "images/devcontainer/templates.html", - "href": "images/devcontainer/templates.html", - "title": "Rocker Dev Container Templates", + "objectID": "images/other/r-ubuntu.html", + "href": "images/other/r-ubuntu.html", + "title": "r-ubuntu", "section": "", - "text": "The Rocker Project provides some Dev Container Templates for building an R development environment.\n\nSource repository: rocker-org/devcontainer-templates\n\nThese are displayed on the GitHub Codespaces or on the VS Code Dev Containers UI.\nThese can also be use from the devcontainer CLI.\n\n\nTerminal\n\ndevcontainer templates apply -t ghcr.io/rocker-org/devcontainer-templates/r-ver" + "text": "Source repository: rocker-org/ubuntu-lts\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" }, { - "objectID": "images/devcontainer/templates.html#overview", - "href": "images/devcontainer/templates.html#overview", - "title": "Rocker Dev Container Templates", + "objectID": "images/other/r-ubuntu.html#quick-reference", + "href": "images/other/r-ubuntu.html#quick-reference", + "title": "r-ubuntu", "section": "", - "text": "The Rocker Project provides some Dev Container Templates for building an R development environment.\n\nSource repository: rocker-org/devcontainer-templates\n\nThese are displayed on the GitHub Codespaces or on the VS Code Dev Containers UI.\nThese can also be use from the devcontainer CLI.\n\n\nTerminal\n\ndevcontainer templates apply -t ghcr.io/rocker-org/devcontainer-templates/r-ver" + "text": "Source repository: rocker-org/ubuntu-lts\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" }, { - "objectID": "images/devcontainer/templates.html#see-also", - "href": "images/devcontainer/templates.html#see-also", - "title": "Rocker Dev Container Templates", - "section": "2 See also", - "text": "2 See also\n\nRocker Dev Container Features\nRocker Dev Container Images" + "objectID": "images/other/r-ubuntu.html#overview", + "href": "images/other/r-ubuntu.html#overview", + "title": "r-ubuntu", + "section": "2 Overview", + "text": "2 Overview\nInstall current R and R packages on Ubuntu LTS, from PPA maintained by Michael Rutter. This image is close to r-base.\nYou can use apt to install binary R packages (r-cran-<package name>) along with its dependencies, as shown in the example below.\napt-get install -y --no-install-recommends r-cran-tidyverse" + }, + { + "objectID": "images/other/r-bspm.html", + "href": "images/other/r-bspm.html", + "title": "r-bspm", + "section": "", + "text": "Source repository: rocker-org/bspm\nDockerfile\n\nrocker/r-bspm:testing\nrocker/r-bspm:22.04\netc.\n\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + }, + { + "objectID": "images/other/r-bspm.html#quick-reference", + "href": "images/other/r-bspm.html#quick-reference", + "title": "r-bspm", + "section": "", + "text": "Source repository: rocker-org/bspm\nDockerfile\n\nrocker/r-bspm:testing\nrocker/r-bspm:22.04\netc.\n\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + }, + { + "objectID": "images/other/r-bspm.html#overview", + "href": "images/other/r-bspm.html#overview", + "title": "r-bspm", + "section": "2 Overview", + "text": "2 Overview\nbspm configured containers. Binary R packages can be easily installed. Based on Debian, Ubuntu, Fedora, and OpenSUSE.\nSimilar to r-base and rocker/r-ubuntu in that these can install R binary packages and system dependencies. but thanks to bspm, rocker/r-bspm automatically installs binary packages and system dependencies even when using the R install.packages() function." + }, + { + "objectID": "images/other/index.html", + "href": "images/other/index.html", + "title": "Additional images", + "section": "", + "text": "r-bspm\n\n\n\n\n\n\n\n\n\n\n\n\n\nr-ubuntu\n\n\n\n\n\n\n\n\n\n\nNo matching items" + }, + { + "objectID": "images/base/r-base.html", + "href": "images/base/r-base.html", + "title": "r-base", + "section": "", + "text": "Source repository: rocker-org/rocker\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + }, + { + "objectID": "images/base/r-base.html#quick-reference", + "href": "images/base/r-base.html#quick-reference", + "title": "r-base", + "section": "", + "text": "Source repository: rocker-org/rocker\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + }, + { + "objectID": "images/base/r-base.html#overview", + "href": "images/base/r-base.html#overview", + "title": "r-base", + "section": "2 Overview", + "text": "2 Overview\nInstall current R from unstable repos.\nr-base and rocker/r-base are built from the same Dockerfile, but with different build tools. The timing of updates and available platforms are different." + }, + { + "objectID": "images/base/r-devel.html", + "href": "images/base/r-devel.html", + "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", + "section": "", + "text": "Source repository:\n\nrocker-org/r-devel\nrocker-org/drd\nrocker-org/drp\nrocker-org/r-devel-san\nrocker-org/r-devel-san-clang\n\nDockerfile\n\nrocker/r-devel\nrocker/drd\nrocker/drp\nrocker/r-devel-san\nrocker/r-devel-ubsan-clang\n\ntags\n\nrocker/r-devel\n\nDockerHub\n\nrocker/drd\n\nDockerHub\n\nrocker/drp\n\nDockerHub\n\nrocker/r-devel-san\n\nDockerHub\n\nrocker/r-devel-ubsan-clang\n\nDockerHub\n\n\nPublished image details: not available\nNon-root default user: docker" + }, + { + "objectID": "images/base/r-devel.html#quick-reference", + "href": "images/base/r-devel.html#quick-reference", + "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", + "section": "", + "text": "Source repository:\n\nrocker-org/r-devel\nrocker-org/drd\nrocker-org/drp\nrocker-org/r-devel-san\nrocker-org/r-devel-san-clang\n\nDockerfile\n\nrocker/r-devel\nrocker/drd\nrocker/drp\nrocker/r-devel-san\nrocker/r-devel-ubsan-clang\n\ntags\n\nrocker/r-devel\n\nDockerHub\n\nrocker/drd\n\nDockerHub\n\nrocker/drp\n\nDockerHub\n\nrocker/r-devel-san\n\nDockerHub\n\nrocker/r-devel-ubsan-clang\n\nDockerHub\n\n\nPublished image details: not available\nNon-root default user: docker" + }, + { + "objectID": "images/base/r-devel.html#overview", + "href": "images/base/r-devel.html#overview", + "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", + "section": "2 Overview", + "text": "2 Overview\nThese images are based on r-base and install prerelease version of R from source, separately from the release version of R. These prerelease version R can be executed with RD(for R-devel) or RP(for R-patched).\n\nBoth rocker/r-devel and rocker/drd are images for running R-devel; rocker/drd has a smaller image size because of the different Dockerfile configuration (layers).\nrocker/drp has R-patched installed.\nrocker/r-devel-san and rocker/r-devel-ubsan-clang provide R development binaries with Sanitizer support, for memory checking during R package development1. rocker/r-devel-san uses clang, and rocker/r-devel-ubsan-clang uses gcc.\n\n\n\n\n\n\n\nImportant\n\n\n\nrocker/r-devel-ubsan-clang must be use with docker run’s --cap-add=SYS_PTRACE option. Otherwise, instrumented processes fail to start due to lacking permissions.\ndocker run --rm -ti --cap-add=SYS_PTRACE rocker/r-devel-ubsan-clang\nAlternatively, an instrumented process can be run with ASAN_OPTIONS=detect_leaks=0, but this turns off leak detection.\n\n\n\n\n\n\n\n\nTip\n\n\n\nrocker/r-ver:devel, rocker/rstudio:devel, rocker/tidyverse:devel, rocker/verse:devel also have R-devel installed." + }, + { + "objectID": "images/base/r-devel.html#footnotes", + "href": "images/base/r-devel.html#footnotes", + "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", + "section": "Footnotes", + "text": "Footnotes\n\n\nWriting R Extensions↩︎" + }, + { + "objectID": "images/base/index.html", + "href": "images/base/index.html", + "title": "r-base stack", + "section": "", + "text": "r-base\n\n\n\n\n\n\n\n\n\n\n\n\n\nr-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang\n\n\n\n\n\n\n\n\n\n\nNo matching items" }, { "objectID": "images/devcontainer/images.html", @@ -46,7 +130,7 @@ "href": "images/devcontainer/images.html#how-to-use", "title": "Rocker Pre-built Dev Container Images", "section": "3 How to use", - "text": "3 How to use\n\n3.1 devcontainer.json and Dockerfile\nSpecify the image in devcontainer.json as follows.\n\n\n.devcontainer/devcontainer.json\n\n{\n \"name\": \"${localWorkspaceFolderBasename}\",\n \"image\": \"ghcr.io/rocker-org/devcontainer/r-ver:4\"\n}\n\nThe basic usage is to customize by adding Dev Container Features here.\nOr, we can use it as a base image in a Dockerfile.\n\n\n.devcontainer/Dockerfile\n\nFROM ghcr.io/rocker-org/devcontainer/tidyverse:4\n\nTo install the R package on the Dockerfile, please refer to the Extending images page.\nWhen using a combination of a devcontainer.json and a Dockerfile, the devcontainer.json file must be rewritten to refer to the Dockerfile.\n\n\n.devcontainer/devcontainer.json\n\n{\n \"name\": \"${localWorkspaceFolderBasename}\",\n \"build\": {\n \"dockerfile\": \"Dockerfile\"\n }\n}\n\n\n\n3.2 Command line\nWe can use radian instead of the default R console.\n\n\nTerminal\n\ndocker run --rm -ti ghcr.io/rocker-org/devcontainer/r-ver:4 radian\n\nAlso httpgd is already installed so we can expose the container port to show the plot in the browser. See the GUI page for details.\n\n\n3.3 RStudio Server\nghcr.io/rocker-org/devcontainer/tidyverse and ghcr.io/rocker-org/devcontainer/geospatial have already installed RStudio Server. See the rocker/rstudio reference page for usage." + "text": "3 How to use\n\n3.1 devcontainer.json and Dockerfile\nSpecify the image in devcontainer.json as follows.\n\n\n.devcontainer/devcontainer.json\n\n{\n \"image\": \"ghcr.io/rocker-org/devcontainer/r-ver:4\"\n}\n\nThe basic usage is to customize by adding Dev Container Features here.\nOr, we can use it as a base image in a Dockerfile.\n\n\n.devcontainer/Dockerfile\n\nFROM ghcr.io/rocker-org/devcontainer/tidyverse:4\n\nTo install the R package on the Dockerfile, please refer to the Extending images page.\nWhen using a combination of a devcontainer.json and a Dockerfile, the devcontainer.json file must be rewritten to refer to the Dockerfile.\n\n\n.devcontainer/devcontainer.json\n\n{\n \"build\": {\n \"dockerfile\": \"Dockerfile\"\n }\n}\n\n\n\n3.2 Command line\nWe can use radian instead of the default R console.\n\n\nTerminal\n\ndocker run --rm -ti ghcr.io/rocker-org/devcontainer/r-ver:4 radian\n\nAlso httpgd is already installed so we can expose the container port to show the plot in the browser. See the GUI page for details.\n\n\n3.3 RStudio Server\nghcr.io/rocker-org/devcontainer/tidyverse and ghcr.io/rocker-org/devcontainer/geospatial have already installed RStudio Server. See the rocker/rstudio reference page for usage." }, { "objectID": "images/devcontainer/images.html#see-also", @@ -60,14 +144,14 @@ "href": "images/devcontainer/features.html", "title": "Rocker Dev Container Features", "section": "", - "text": "The Rocker Project provides some Dev Container Features for installing R or installing software often used with R.\n\nSource repository: rocker-org/devcontainer-features\n\nYou can find them on the Dev Containers site, the GitHub Codespaces Dev Container Editor, or, VSCode Dev Containers.\nThese can be used to easily configure R on containers without R installed, or to make containers for R even more useful. And of course, we can use them independently of R! (except for the Features to install R)\nFor example, install R on the default image of Codespaces by editing the devcontainer.json file as follows:\n\n\n.devcontainer/devcontainer.json\n\n{\n \"image\": \"mcr.microsoft.com/devcontainers/universal:2\",\n \"features\": {\n \"ghcr.io/rocker-org/devcontainer-features/r-apt:latest\": {}\n }\n}\n\nCheck the source repository for details on each Feature." + "text": "The Rocker Project provides some Dev Container Features for installing R or installing software often used with R.\n\nSource repository: rocker-org/devcontainer-features\n\nYou can find them on the Dev Containers site, the GitHub Codespaces Dev Container Editor, or, VSCode Dev Containers.\nThese can be used to easily configure R on containers without R installed, or to make containers for R even more useful. And of course, we can use them independently of R! (except for the Features to install R)\nFor example, install R on the default image of Codespaces by editing the devcontainer.json file as follows:\n\n\n.devcontainer/devcontainer.json\n\n{\n \"image\": \"mcr.microsoft.com/devcontainers/universal:2\",\n \"features\": {\n \"ghcr.io/rocker-org/devcontainer-features/r-apt:latest\": {}\n }\n}\n\nThere is also a repository that can be used to try Dev Containers on GitHub Codespaces immediately.\n\nrocker-org/devcontainer-try-r\n\nCheck the source repository for details on each Feature." }, { "objectID": "images/devcontainer/features.html#overview", "href": "images/devcontainer/features.html#overview", "title": "Rocker Dev Container Features", "section": "", - "text": "The Rocker Project provides some Dev Container Features for installing R or installing software often used with R.\n\nSource repository: rocker-org/devcontainer-features\n\nYou can find them on the Dev Containers site, the GitHub Codespaces Dev Container Editor, or, VSCode Dev Containers.\nThese can be used to easily configure R on containers without R installed, or to make containers for R even more useful. And of course, we can use them independently of R! (except for the Features to install R)\nFor example, install R on the default image of Codespaces by editing the devcontainer.json file as follows:\n\n\n.devcontainer/devcontainer.json\n\n{\n \"image\": \"mcr.microsoft.com/devcontainers/universal:2\",\n \"features\": {\n \"ghcr.io/rocker-org/devcontainer-features/r-apt:latest\": {}\n }\n}\n\nCheck the source repository for details on each Feature." + "text": "The Rocker Project provides some Dev Container Features for installing R or installing software often used with R.\n\nSource repository: rocker-org/devcontainer-features\n\nYou can find them on the Dev Containers site, the GitHub Codespaces Dev Container Editor, or, VSCode Dev Containers.\nThese can be used to easily configure R on containers without R installed, or to make containers for R even more useful. And of course, we can use them independently of R! (except for the Features to install R)\nFor example, install R on the default image of Codespaces by editing the devcontainer.json file as follows:\n\n\n.devcontainer/devcontainer.json\n\n{\n \"image\": \"mcr.microsoft.com/devcontainers/universal:2\",\n \"features\": {\n \"ghcr.io/rocker-org/devcontainer-features/r-apt:latest\": {}\n }\n}\n\nThere is also a repository that can be used to try Dev Containers on GitHub Codespaces immediately.\n\nrocker-org/devcontainer-try-r\n\nCheck the source repository for details on each Feature." }, { "objectID": "images/devcontainer/features.html#install-r-on-dev-containers", @@ -97,6 +181,27 @@ "section": "Footnotes", "text": "Footnotes\n\n\nThis Feature does not directly install R, but it configures mamba so we can use mamba to install R.↩︎\nOf the amd64 and arm64 Debian and Ubuntu platforms that can use r-rig, only amd64 Ubuntu can use Posit Public Package Manager, and Posit Public Package Manager will be not configured on the other platforms.↩︎" }, + { + "objectID": "images/devcontainer/templates.html", + "href": "images/devcontainer/templates.html", + "title": "Rocker Dev Container Templates", + "section": "", + "text": "The Rocker Project provides some Dev Container Templates for building an R development environment.\n\nSource repository: rocker-org/devcontainer-templates\n\nThese are displayed on the GitHub Codespaces or on the VS Code Dev Containers UI.\nThese can also be use from the devcontainer CLI.\n\n\nTerminal\n\ndevcontainer templates apply -t ghcr.io/rocker-org/devcontainer-templates/r-ver" + }, + { + "objectID": "images/devcontainer/templates.html#overview", + "href": "images/devcontainer/templates.html#overview", + "title": "Rocker Dev Container Templates", + "section": "", + "text": "The Rocker Project provides some Dev Container Templates for building an R development environment.\n\nSource repository: rocker-org/devcontainer-templates\n\nThese are displayed on the GitHub Codespaces or on the VS Code Dev Containers UI.\nThese can also be use from the devcontainer CLI.\n\n\nTerminal\n\ndevcontainer templates apply -t ghcr.io/rocker-org/devcontainer-templates/r-ver" + }, + { + "objectID": "images/devcontainer/templates.html#see-also", + "href": "images/devcontainer/templates.html#see-also", + "title": "Rocker Dev Container Templates", + "section": "2 See also", + "text": "2 See also\n\nRocker Dev Container Features\nRocker Dev Container Images" + }, { "objectID": "images/devcontainer/index.html", "href": "images/devcontainer/index.html", @@ -105,60 +210,74 @@ "text": "Rocker Dev Container Features\n\n\n\n\n\n\n\n\n\n\n\n\n\nRocker Dev Container Templates\n\n\n\n\n\n\n\n\n\n\n\n\n\nRocker Pre-built Dev Container Images\n\n\n\n\n\n\n\n\n\n\nNo matching items" }, { - "objectID": "images/base/r-devel.html", - "href": "images/base/r-devel.html", - "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", + "objectID": "images/versioned/binder.html", + "href": "images/versioned/binder.html", + "title": "binder", "section": "", - "text": "Source repository:\n\nrocker-org/r-devel\nrocker-org/drd\nrocker-org/drp\nrocker-org/r-devel-san\nrocker-org/r-devel-san-clang\n\nDockerfile\n\nrocker/r-devel\nrocker/drd\nrocker/drp\nrocker/r-devel-san\nrocker/r-devel-ubsan-clang\n\ntags\n\nrocker/r-devel\n\nDockerHub\n\nrocker/drd\n\nDockerHub\n\nrocker/drp\n\nDockerHub\n\nrocker/r-devel-san\n\nDockerHub\n\nrocker/r-devel-ubsan-clang\n\nDockerHub\n\n\nPublished image details: not available\nNon-root default user: docker" + "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: rstudio" }, { - "objectID": "images/base/r-devel.html#quick-reference", - "href": "images/base/r-devel.html#quick-reference", - "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", + "objectID": "images/versioned/binder.html#quick-reference", + "href": "images/versioned/binder.html#quick-reference", + "title": "binder", "section": "", - "text": "Source repository:\n\nrocker-org/r-devel\nrocker-org/drd\nrocker-org/drp\nrocker-org/r-devel-san\nrocker-org/r-devel-san-clang\n\nDockerfile\n\nrocker/r-devel\nrocker/drd\nrocker/drp\nrocker/r-devel-san\nrocker/r-devel-ubsan-clang\n\ntags\n\nrocker/r-devel\n\nDockerHub\n\nrocker/drd\n\nDockerHub\n\nrocker/drp\n\nDockerHub\n\nrocker/r-devel-san\n\nDockerHub\n\nrocker/r-devel-ubsan-clang\n\nDockerHub\n\n\nPublished image details: not available\nNon-root default user: docker" + "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: rstudio" }, { - "objectID": "images/base/r-devel.html#overview", - "href": "images/base/r-devel.html#overview", - "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", + "objectID": "images/versioned/binder.html#overview", + "href": "images/versioned/binder.html#overview", + "title": "binder", "section": "2 Overview", - "text": "2 Overview\nThese images are based on r-base and install prerelease version of R from source, separately from the release version of R. These prerelease version R can be executed with RD(for R-devel) or RP(for R-patched).\n\nBoth rocker/r-devel and rocker/drd are images for running R-devel; rocker/drd has a smaller image size because of the different Dockerfile configuration (layers).\nrocker/drp has R-patched installed.\nrocker/r-devel-san and rocker/r-devel-ubsan-clang provide R development binaries with Sanitizer support, for memory checking during R package development1. rocker/r-devel-san uses clang, and rocker/r-devel-ubsan-clang uses gcc.\n\n\n\n\n\n\n\nImportant\n\n\n\nrocker/r-devel-ubsan-clang must be use with docker run’s --cap-add=SYS_PTRACE option. Otherwise, instrumented processes fail to start due to lacking permissions.\ndocker run --rm -ti --cap-add=SYS_PTRACE rocker/r-devel-ubsan-clang\nAlternatively, an instrumented process can be run with ASAN_OPTIONS=detect_leaks=0, but this turns off leak detection.\n\n\n\n\n\n\n\n\nTip\n\n\n\nrocker/r-ver:devel, rocker/rstudio:devel, rocker/tidyverse:devel, rocker/verse:devel also have R-devel installed." + "text": "2 Overview\nThis image is based on rocker/geospatial and configured to run RStudio Server on Binder, thanks to jupyter-rsession-proxy.\nFor instructions on how to use this image with Binder for your project, see the rocker-org/binder, a template repository.\nBy placing the following badge in README.md of your project, RStudio can be started and used in the browser by simply clicking on the badge.\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/<GITHUB_USER>/<REPO>/<BRANCH>?urlpath=rstudio)\nYou can also make a Binder badge with usethis::use_binder_badge() R function.\n\n\n\n\n\n\nNote\n\n\n\nThis document is for R 4.0.0 >= images." }, { - "objectID": "images/base/r-devel.html#footnotes", - "href": "images/base/r-devel.html#footnotes", - "title": "r-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang", - "section": "Footnotes", - "text": "Footnotes\n\n\nWriting R Extensions↩︎" + "objectID": "images/versioned/binder.html#how-to-use", + "href": "images/versioned/binder.html#how-to-use", + "title": "binder", + "section": "3 How to use", + "text": "3 How to use\n\n3.1 Use outside of Binder\nIf you use this image with Docker, the default command runs JupyterLab. Since the JupyterLab port is set to 8888, you can open the JupyterLab screen on localhost:8888 from your browser with the following command.\ndocker run --rm -ti -p 8888:8888 rocker/binder\nYou can log in by entering the token displayed in the terminal as your password.\nIf you want to set your own password for Jupyter, you can set it as a environment variable JUPYTER_TOKEN1.\ndocker run --rm -ti -e JUPYTER_TOKEN=yourpassword -p 8888:8888 rocker/binder\n\n\n\n\n\n\nTip\n\n\n\nRStudio Server started from Jupyter does not read environment variables set at container startup; if you want to use environment variables on your RStudio instance, set them on the .Renviron file.\n\n\nTo run RStudio Server directly as in rocker/rstudio, execute /init command with the root user specified.\ndocker run --rm -ti -p 8787:8787 --user root rocker/binder /init" }, { - "objectID": "images/base/index.html", - "href": "images/base/index.html", - "title": "r-base stack", - "section": "", - "text": "r-base\n\n\n\n\n\n\n\n\n\n\n\n\n\nr-devel, drd, drp, rocker/r-devel-san, rocker/r-devel-ubsan-clang\n\n\n\n\n\n\n\n\n\n\nNo matching items" + "objectID": "images/versioned/binder.html#footnotes", + "href": "images/versioned/binder.html#footnotes", + "title": "binder", + "section": "Footnotes", + "text": "Footnotes\n\n\nJupyter Server Config file and command line options↩︎" }, { - "objectID": "images/base/r-base.html", - "href": "images/base/r-base.html", - "title": "r-base", + "objectID": "images/versioned/shiny.html", + "href": "images/versioned/shiny.html", + "title": "shiny, shiny-verse", "section": "", - "text": "Source repository: rocker-org/rocker\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\n\nrocker/shiny\nrocker/shiny-verse\n\ntags\n\nrocker/shiny\n\nDockerHub\nGitHub Container Registry\n\nrocker/shiny-verse\n\nDockerHub\nGitHub Container Registry\n\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" }, { - "objectID": "images/base/r-base.html#quick-reference", - "href": "images/base/r-base.html#quick-reference", - "title": "r-base", + "objectID": "images/versioned/shiny.html#quick-reference", + "href": "images/versioned/shiny.html#quick-reference", + "title": "shiny, shiny-verse", "section": "", - "text": "Source repository: rocker-org/rocker\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\n\nrocker/shiny\nrocker/shiny-verse\n\ntags\n\nrocker/shiny\n\nDockerHub\nGitHub Container Registry\n\nrocker/shiny-verse\n\nDockerHub\nGitHub Container Registry\n\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" }, { - "objectID": "images/base/r-base.html#overview", - "href": "images/base/r-base.html#overview", - "title": "r-base", + "objectID": "images/versioned/shiny.html#overview", + "href": "images/versioned/shiny.html#overview", + "title": "shiny, shiny-verse", "section": "2 Overview", - "text": "2 Overview\nInstall current R from unstable repos.\nr-base and rocker/r-base are built from the same Dockerfile, but with different build tools. The timing of updates and available platforms are different." + "text": "2 Overview\nThese images are based on rocker/r-ver, and Shiny Server and some R packages for Shiny Server are already installed.\nThe basic usage of these images is the same, with the difference being the amount of additional (R) packages installed. (See image details for lists of installation packages)\n\nrocker/shiny-verse has already installed many R packages and their dependencies apt packages. e.g. the tidyverse package, the devtools package, some R Database Interface packages, the data.table package, the fst package, and the Apache Arrow R package.\n\nSince the Shiny Server port is set to 3838, you can open the Shiny screen on localhost:3838 from your browser with the following command.\ndocker run --rm -ti -p 3838:3838 rocker/shiny\n\n\n\n\n\n\nNote\n\n\n\nThis document is for R 4.0.0 >= images. For R <= 3.6 images, please check the rocker-org/shiny repository." + }, + { + "objectID": "images/versioned/shiny.html#how-to-use", + "href": "images/versioned/shiny.html#how-to-use", + "title": "shiny, shiny-verse", + "section": "3 How to use", + "text": "3 How to use\n\n3.1 Environment variables\nSeveral special environment variables can be set to modify Shiny Server’s behavior.\n\n3.1.1 APPLICATION_LOGS_TO_STDOUT\nThe Shiny Server log and all application logs are written to stdout and can be viewed using the docker logs command.\nThe logs for individual apps are still kept in the /var/log/shiny-server directory1. If you want to avoid printing the logs to stdout, set the environment variable APPLICATION_LOGS_TO_STDOUT to false.\ndocker run --rm -ti -e APPLICATION_LOGS_TO_STDOUT=false -p 3838:3838 rocker/shiny\n\n\n\n3.2 Run by non-root user\nShiny Server is normally run by the root user, and sessions within the Shiny Server use the non-root user with UID 999 named shiny.\nBy setting the --user option as follows, Shiny Server can be run by the shiny user.\ndocker run --rm -ti --user shiny -p 3838:3838 rocker/shiny\n\n\n3.3 See also\n\nShared Volumes\nNetworking" + }, + { + "objectID": "images/versioned/shiny.html#footnotes", + "href": "images/versioned/shiny.html#footnotes", + "title": "shiny, shiny-verse", + "section": "Footnotes", + "text": "Footnotes\n\n\nShiny Server Administrator’s Guide↩︎" }, { "objectID": "images/versioned/rstudio.html", @@ -193,91 +312,14 @@ "href": "images/versioned/rstudio.html#how-to-use", "title": "rstudio, tidyverse, verse, geospatial", "section": "4 How to use", - "text": "4 How to use\n\n4.1 Environment variables\nSeveral special environment variables can be set to modify RStudio Server’s behavior.\n\n\n\n\n\n\nNote\n\n\n\nThe process of referencing these environment variables is done by the /init command, which is the default command set for the container. Therefore, if the /init command is not executed, nothing will happen.\nFor example, if you enter the container with the following command, the uid of the user rstudio is unchanged and remains 1000.\ndocker run --rm -ti -e USERID=1001 -e GROUPID=1001 --user rstudio rocker/tidyverse bash\n\n\n\n4.1.1 PASSWORD\nYou can set a custom password to log in the RStudio instance. Please set your password as an environmental variable PASSWORD like this:\ndocker run --rm -ti -e PASSWORD=yourpassword -p 8787:8787 rocker/rstudio\n\n\n4.1.2 ROOT\nIf ROOT is set to true, the default non-root user will be added to the sudoers group when the server init process.\ndocker run --rm -ti -e ROOT=true -p 8787:8787 rocker/rstudio\nThis configuration allows you to execute sudo commands, like sudo apt update, on the terminal on RStudio.\n\n\n\n\n\n\nNote\n\n\n\nWhen using the sudo command, you must enter the same password you used to log into RStudio.\n\n\n\n\n4.1.3 DISABLE_AUTH\nYou can disable authentication for RStudio Server by setting an environmental variable DISABLE_AUTH=true.\ndocker run --rm -ti -e DISABLE_AUTH=true -p 127.0.0.1:8787:8787 rocker/rstudio\nWith this example, when you visit localhost:8787, you will now automatically be logged in as the user rstudio without having to first enter a user name and password.\n\n\n\n\n\n\nWarning\n\n\n\nUse this setting only in a secure environment. Without authentication, anyone who has access to that port can log in the RStudio Server.\nIf you are using a container on your local computer, it is recommended that you configure the port publishing as -p 127.0.0.1:8787:8787, as in the example, so that it can only be accessed from the same computer.\n\n\n\n\n\n\n\n\nNote\n\n\n\nDISABLE_AUTH=true setting only skips the RStudio log in page. So you will still need to enter the password when use the sudo command with ROOT=true option.\n\n\n\n\n4.1.4 USERID and GROUPID\nThe UID and GID of the default non-root user can be changed as follows:\ndocker run --rm -ti -e USERID=1001 -e GROUPID=1001 -p 8787:8787 rocker/rstudio\n\n\n\n\n\n\nWarning\n\n\n\nIf these are set, ownership of the /home/rstudio directory in the container is updated by the root user. This will also overwrite the ownership of any files that are bind-mounted under the /home/rstudio directory.\n\n\n\n\n\n4.2 Editing work on RStudio Server\nIf you want to make repeated edits on RStudio Server, It would be useful to be able to share files edited on the container with the Docker host.\nHere are some hints for doing this and a sample compose file (for docker compose).\n\nRecent RStudio Server’s configuration files are saved in the ~/.config/rstudio/ directory1.\nIt is not recommended to bind-mount whole home directory on the container (/home/rstudio); RStudio Server may not work properly.\nSince RStudio Server opens the user’s home directory (/home/rstudio) by default, it is easier to use if a working directory is set up under /home/rstudio, e.g. /home/rstudio/workspace. However, for example, another directory such as the one containing CSV files should not necessarily have to be under the home directory, so it is recommended to bind-mount it under its own name directly under the root, e.g. /other_dir.\n\n\n\ncompose.yml\n\nservices:\n rstudio:\n image: rocker/verse:4\n ports:\n - \"8787:8787\"\n environment:\n PASSWORD: yourpassword\n volumes:\n - ./.rstudio_config:/home/rstudio/.config/rstudio\n - ~/workspace:/home/rstudio/workspace\n - /other_dir:/other_dir\n\n\n\n4.3 See also\n\nNetworking\nShared Volumes" - }, - { - "objectID": "images/versioned/rstudio.html#footnotes", - "href": "images/versioned/rstudio.html#footnotes", - "title": "rstudio, tidyverse, verse, geospatial", - "section": "Footnotes", - "text": "Footnotes\n\n\nRStudio Workbench Administration Guide↩︎" - }, - { - "objectID": "images/versioned/binder.html", - "href": "images/versioned/binder.html", - "title": "binder", - "section": "", - "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: rstudio" - }, - { - "objectID": "images/versioned/binder.html#quick-reference", - "href": "images/versioned/binder.html#quick-reference", - "title": "binder", - "section": "", - "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: rstudio" - }, - { - "objectID": "images/versioned/binder.html#overview", - "href": "images/versioned/binder.html#overview", - "title": "binder", - "section": "2 Overview", - "text": "2 Overview\nThis image is based on rocker/geospatial and configured to run RStudio Server on Binder, thanks to jupyter-rsession-proxy.\nFor instructions on how to use this image with Binder for your project, see the rocker-org/binder, a template repository.\nBy placing the following badge in README.md of your project, RStudio can be started and used in the browser by simply clicking on the badge.\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/<GITHUB_USER>/<REPO>/<BRANCH>?urlpath=rstudio)\nYou can also make a Binder badge with usethis::use_binder_badge() R function.\n\n\n\n\n\n\nNote\n\n\n\nThis document is for R 4.0.0 >= images." - }, - { - "objectID": "images/versioned/binder.html#how-to-use", - "href": "images/versioned/binder.html#how-to-use", - "title": "binder", - "section": "3 How to use", - "text": "3 How to use\n\n3.1 Use outside of Binder\nIf you use this image with Docker, the default command runs JupyterLab. Since the JupyterLab port is set to 8888, you can open the JupyterLab screen on localhost:8888 from your browser with the following command.\ndocker run --rm -ti -p 8888:8888 rocker/binder\nYou can log in by entering the token displayed in the terminal as your password.\nIf you want to set your own password for Jupyter, you can set it as a environment variable JUPYTER_TOKEN1.\ndocker run --rm -ti -e JUPYTER_TOKEN=yourpassword -p 8888:8888 rocker/binder\n\n\n\n\n\n\nTip\n\n\n\nRStudio Server started from Jupyter does not read environment variables set at container startup; if you want to use environment variables on your RStudio instance, set them on the .Renviron file.\n\n\nTo run RStudio Server directly as in rocker/rstudio, execute /init command with the root user specified.\ndocker run --rm -ti -p 8787:8787 --user root rocker/binder /init" - }, - { - "objectID": "images/versioned/binder.html#footnotes", - "href": "images/versioned/binder.html#footnotes", - "title": "binder", - "section": "Footnotes", - "text": "Footnotes\n\n\nJupyter Server Config file and command line options↩︎" - }, - { - "objectID": "images/versioned/r-ver.html", - "href": "images/versioned/r-ver.html", - "title": "r-ver", - "section": "", - "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" - }, - { - "objectID": "images/versioned/r-ver.html#quick-reference", - "href": "images/versioned/r-ver.html#quick-reference", - "title": "r-ver", - "section": "", - "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" - }, - { - "objectID": "images/versioned/r-ver.html#overview", - "href": "images/versioned/r-ver.html#overview", - "title": "r-ver", - "section": "2 Overview", - "text": "2 Overview\nrocker/r-ver is alternate image to r-base, with an emphasis on reproducibility.\nCompared to r-base,\n\nBuilds on Ubuntu LTS rather than Debian and system libraries are tied to the Ubuntu version. Images will use the most recent LTS available at the time when the corresponding R version was released.\n\nSince compatibility problems are likely to occur immediately after the release of a new Ubuntu LTS, the version to be used is the one that is at least 90 days past release.\n\nrocker/r-ver:4.0.0 is based on Ubuntu 20.04 (ubuntu:focal) because no interval was set at the time of the Ubuntu 20.04 release.\n\n\nInstalls a fixed version of R itself from source, rather than whatever is already packaged for Ubuntu (the r-base stack gets the latest R version as a binary from Debian unstable).\nThe only platforms available are linux/amd64 and linux/arm64 (arm64 images are experimental and only available for rocker/r-ver 4.1.0 or later).\nSet the Posit Public Package Manager (P3M, a.k.a RStudio Package Manager, RSPM) as default CRAN mirror. For the amd64 platform, RSPM serves compiled Linux binaries of R packages and greatly speeds up package installs.\nNon-latest R version images installs all R packages from a fixed snapshot of CRAN mirror at a given date. This setting ensures that the same version of the R package is installed no matter when the installation is performed.\nProvides images that are generally smaller than the r-base series.\n\n\n\n\n\n\n\nNote\n\n\n\nThis document is for R 4.0.0 >= images. Please check the rocker-org/rocker-versioned repository for R <= 3.6.3 images." - }, - { - "objectID": "images/versioned/r-ver.html#special-tags", - "href": "images/versioned/r-ver.html#special-tags", - "title": "r-ver", - "section": "3 Special tags", - "text": "3 Special tags\n\n3.1 devel\nThe devel images are based on ubuntu:latest (the latest Ubuntu LTS version) and install the latest R-devel daily snapshot.\n\n\n3.2 cuda\nTags which contain cuda (e.g. rocker/r-ver:4.0.0-cuda10.1) are alias of rocker/cuda.\n\n\n\n\n\n\nWarning\n\n\n\ncuda tags will be discontinued in the future, so please use rocker/cuda instead." - }, - { - "objectID": "images/versioned/r-ver.html#how-to-use", - "href": "images/versioned/r-ver.html#how-to-use", - "title": "r-ver", - "section": "4 How to use", - "text": "4 How to use\n\n4.1 Switch the default CRAN mirror\nAs explained in the overview, rocker/r-ver may have set a past CRAN snapshot as the default repository. This is determined by the options set in the Rprofile. To use a different CRAN mirror, simply write a new setting in the Rprofile.\nFor example, the following Dockerfile sets the default repository to CRAN.\n\n\nDockerfile\n\nFROM rocker/r-ver:4\nRUN echo 'options(repos = c(CRAN = \"https://cloud.r-project.org\"))' >>\"${R_HOME}/etc/Rprofile.site\"\n\n\n\n\n\n\n\nTip\n\n\n\nTo do the same thing by a non-root user in a container, for example, the following command can be used.\n\n\nTerminal\n\necho 'options(repos = c(CRAN = \"https://cloud.r-project.org\"))' | sudo sh -c 'cat - >>\"${R_HOME}/etc/Rprofile.site\"'\n\n\n\n\n\n\n\n\n\nTip\n\n\n\nWe can also use the script setup_R.sh included in rocker/r-ver.\n\n\nDockerfile\n\nFROM rocker/r-ver:4\nRUN /rocker_scripts/setup_R.sh https://packagemanager.posit.co/cran/__linux__/jammy/2023-01-29\n\nThe advantage of using this script is that if you specify a URL for binary installation from Posit Public Package Manager (P3M), it will rewrite the URL and switch to source installation on non-amd64 platforms.\nFor example, in the above example, https://packagemanager.posit.co/cran/__linux__/jammy/2023-01-29 is set for the amd64 platform, but https://packagemanager.posit.co/cran/2023-01-29 is set for the arm64 platform as the default CRAN mirror.\n\n\nOr, if you want to temporarily change the CRAN mirror during an R session, use the options() function.\nA common use case is when developing an R package and using the devtools::check() function; if the CRAN mirror is not changed from the default, an error like cannot open URL 'packagemanager.posit.co/cran/__linux__/jammy/latest/web/packages/packages.rds': HTTP status was '404 Not Found' may occur.\n\n\nR Terminal\n\noptions(repos = c(CRAN = \"https://cloud.r-project.org\"))\ndevtools::check()\n\nIt is also possible to set up P3M and CRAN at the same time to achieve both binary installation and successful the devtools::check() function as follows. (rocker-org/rocker-versioned2#658)\n\n\nDockerfile\n\nFROM rocker/r-ver:4\nRUN echo 'options(repos = c(P3M = \"https://packagemanager.posit.co/cran/__linux__/jammy/latest\", CRAN = \"https://cloud.r-project.org\"))' >>\"${R_HOME}/etc/Rprofile.site\"\n\n\n\n4.2 Selecting the BLAS implementation used by R\nBy default rocker/r-ver uses the OpenBLAS implementation for Linear Algebra1. But it is possible to switch for the reference BLAS implementation (as provided by the Debian package libblas-dev) using the Shared BLAS setup2.\n\n\n\n\n\n\nImportant\n\n\n\nCalling Python numpy by the reticulate package on R using OpenBLAS may cause a segfault. This causes an error when trying to use Python packages like matplotlib or scikit-learn. (rocker-org/rocker-versioned2#471, numpy/numpy#21643)\nIf this error occurs, change the BLAS used by R to libblas as described below.\n\n\n\n4.2.1 Checking which BLAS is in use\nYou can see the current BLAS configuration for R by using sessionInfo() function in R console.\n\n\nR Terminal\n\nsessionInfo()\n#> R version 4.2.0 (2022-04-22)\n#> Platform: x86_64-pc-linux-gnu (64-bit)\n#> Running under: Ubuntu 20.04.4 LTS\n#>\n#> Matrix products: default\n#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\n#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3\n\nHere for instance R uses OpenBLAS.\n\n\n4.2.2 Switching BLAS implementations\nYou can switch BLAS used by R with the Debian update-alternatives script:\n\nSwitch to libblasSwitch to openblas\n\n\n\n\nTerminal\n\nARCH=$(uname -m)\nupdate-alternatives --set \"libblas.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/blas/libblas.so.3\"\nupdate-alternatives --set \"liblapack.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/lapack/liblapack.so.3\"\n\n\n\n\n\nTerminal\n\nARCH=$(uname -m)\nupdate-alternatives --set \"libblas.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/openblas-pthread/libblas.so.3\"\nupdate-alternatives --set \"liblapack.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/openblas-pthread/liblapack.so.3\"" + "text": "4 How to use\n\n4.1 Environment variables\nSeveral special environment variables can be set to modify RStudio Server’s behavior.\n\n\n\n\n\n\nNote\n\n\n\nThe process of referencing these environment variables is done by the /init command, which is the default command set for the container. Therefore, if the /init command is not executed, nothing will happen.\nFor example, if you enter the container with the following command, the uid of the user rstudio is unchanged and remains 1000.\ndocker run --rm -ti -e USERID=1001 -e GROUPID=1001 --user rstudio rocker/tidyverse bash\n\n\n\n4.1.1 PASSWORD\nYou can set a custom password to log in the RStudio instance. Please set your password as an environmental variable PASSWORD like this:\ndocker run --rm -ti -e PASSWORD=yourpassword -p 8787:8787 rocker/rstudio\n\n\n4.1.2 ROOT\nIf ROOT is set to true, the default non-root user will be added to the sudoers group when the server init process.\ndocker run --rm -ti -e ROOT=true -p 8787:8787 rocker/rstudio\nThis configuration allows you to execute sudo commands, like sudo apt update, on the terminal on RStudio.\n\n\n\n\n\n\nNote\n\n\n\nWhen using the sudo command, you must enter the same password you used to log into RStudio.\n\n\n\n\n4.1.3 DISABLE_AUTH\nYou can disable authentication for RStudio Server by setting an environmental variable DISABLE_AUTH=true.\ndocker run --rm -ti -e DISABLE_AUTH=true -p 127.0.0.1:8787:8787 rocker/rstudio\nWith this example, when you visit localhost:8787, you will now automatically be logged in as the user rstudio without having to first enter a user name and password.\n\n\n\n\n\n\nWarning\n\n\n\nUse this setting only in a secure environment. Without authentication, anyone who has access to that port can log in the RStudio Server.\nIf you are using a container on your local computer, it is recommended that you configure the port publishing as -p 127.0.0.1:8787:8787, as in the example, so that it can only be accessed from the same computer.\n\n\n\n\n\n\n\n\nNote\n\n\n\nDISABLE_AUTH=true setting only skips the RStudio log in page. So you will still need to enter the password when use the sudo command with ROOT=true option.\n\n\n\n\n4.1.4 USERID and GROUPID\nThe UID and GID of the default non-root user can be changed as follows:\ndocker run --rm -ti -e USERID=1001 -e GROUPID=1001 -p 8787:8787 rocker/rstudio\n\n\n\n\n\n\nWarning\n\n\n\nIf these are set, ownership of the /home/rstudio directory in the container is updated by the root user. This will also overwrite the ownership of any files that are bind-mounted under the /home/rstudio directory.\n\n\n\n\n\n4.2 Editing work on RStudio Server\nIf you want to make repeated edits on RStudio Server, It would be useful to be able to share files edited on the container with the Docker host.\nHere are some hints for doing this and a sample compose file (for docker compose).\n\nRecent RStudio Server’s configuration files are saved in the ~/.config/rstudio/ directory1.\nIt is not recommended to bind-mount whole home directory on the container (/home/rstudio); RStudio Server may not work properly.\nSince RStudio Server opens the user’s home directory (/home/rstudio) by default, it is easier to use if a working directory is set up under /home/rstudio, e.g. /home/rstudio/workspace. However, for example, another directory such as the one containing CSV files should not necessarily have to be under the home directory, so it is recommended to bind-mount it under its own name directly under the root, e.g. /other_dir.\n\n\n\ncompose.yml\n\nservices:\n rstudio:\n image: rocker/verse:4\n ports:\n - \"8787:8787\"\n environment:\n PASSWORD: yourpassword\n volumes:\n - ./.rstudio_config:/home/rstudio/.config/rstudio\n - ~/workspace:/home/rstudio/workspace\n - /other_dir:/other_dir\n\n\n\n4.3 See also\n\nNetworking\nShared Volumes" }, { - "objectID": "images/versioned/r-ver.html#footnotes", - "href": "images/versioned/r-ver.html#footnotes", - "title": "r-ver", + "objectID": "images/versioned/rstudio.html#footnotes", + "href": "images/versioned/rstudio.html#footnotes", + "title": "rstudio, tidyverse, verse, geospatial", "section": "Footnotes", - "text": "Footnotes\n\n\nR Installation and Administration A.3.1 BLAS↩︎\nR Installation and Administration A.3.1.4 Shared BLAS↩︎" + "text": "Footnotes\n\n\nRStudio Workbench Administration Guide↩︎" }, { "objectID": "images/versioned/cuda.html", @@ -322,39 +364,46 @@ "text": "binder\n\n\n\n\n\n\n\n\n\n\n\n\n\ncuda, ml, ml-verse\n\n\n\n\n\n\n\n\n\n\n\n\n\nr-ver\n\n\n\n\n\n\n\n\n\n\n\n\n\nrstudio, tidyverse, verse, geospatial\n\n\n\n\n\n\n\n\n\n\n\n\n\nshiny, shiny-verse\n\n\n\n\n\n\n\n\n\n\nNo matching items" }, { - "objectID": "images/versioned/shiny.html", - "href": "images/versioned/shiny.html", - "title": "shiny, shiny-verse", + "objectID": "images/versioned/r-ver.html", + "href": "images/versioned/r-ver.html", + "title": "r-ver", "section": "", - "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\n\nrocker/shiny\nrocker/shiny-verse\n\ntags\n\nrocker/shiny\n\nDockerHub\nGitHub Container Registry\n\nrocker/shiny-verse\n\nDockerHub\nGitHub Container Registry\n\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" + "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" }, { - "objectID": "images/versioned/shiny.html#quick-reference", - "href": "images/versioned/shiny.html#quick-reference", - "title": "shiny, shiny-verse", + "objectID": "images/versioned/r-ver.html#quick-reference", + "href": "images/versioned/r-ver.html#quick-reference", + "title": "r-ver", "section": "", - "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\n\nrocker/shiny\nrocker/shiny-verse\n\ntags\n\nrocker/shiny\n\nDockerHub\nGitHub Container Registry\n\nrocker/shiny-verse\n\nDockerHub\nGitHub Container Registry\n\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" + "text": "Source repository: rocker-org/rocker-versioned2\nDockerfile\ntags\n\nDockerHub\nGitHub Container Registry\n\nPublished image details: rocker-org/rocker-versioned2’s wiki\nNon-root default user: not exist" }, { - "objectID": "images/versioned/shiny.html#overview", - "href": "images/versioned/shiny.html#overview", - "title": "shiny, shiny-verse", + "objectID": "images/versioned/r-ver.html#overview", + "href": "images/versioned/r-ver.html#overview", + "title": "r-ver", "section": "2 Overview", - "text": "2 Overview\nThese images are based on rocker/r-ver, and Shiny Server and some R packages for Shiny Server are already installed.\nThe basic usage of these images is the same, with the difference being the amount of additional (R) packages installed. (See image details for lists of installation packages)\n\nrocker/shiny-verse has already installed many R packages and their dependencies apt packages. e.g. the tidyverse package, the devtools package, some R Database Interface packages, the data.table package, the fst package, and the Apache Arrow R package.\n\nSince the Shiny Server port is set to 3838, you can open the Shiny screen on localhost:3838 from your browser with the following command.\ndocker run --rm -ti -p 3838:3838 rocker/shiny\n\n\n\n\n\n\nNote\n\n\n\nThis document is for R 4.0.0 >= images. For R <= 3.6 images, please check the rocker-org/shiny repository." + "text": "2 Overview\nrocker/r-ver is alternate image to r-base, with an emphasis on reproducibility.\nCompared to r-base,\n\nBuilds on Ubuntu LTS rather than Debian and system libraries are tied to the Ubuntu version. Images will use the most recent LTS available at the time when the corresponding R version was released.\n\nSince compatibility problems are likely to occur immediately after the release of a new Ubuntu LTS, the version to be used is the one that is at least 90 days past release.\n\nrocker/r-ver:4.0.0 is based on Ubuntu 20.04 (ubuntu:focal) because no interval was set at the time of the Ubuntu 20.04 release.\n\n\nInstalls a fixed version of R itself from source, rather than whatever is already packaged for Ubuntu (the r-base stack gets the latest R version as a binary from Debian unstable).\nThe only platforms available are linux/amd64 and linux/arm64 (arm64 images are experimental and only available for rocker/r-ver 4.1.0 or later).\nSet the Posit Public Package Manager (P3M, a.k.a RStudio Package Manager, RSPM) as default CRAN mirror. For the amd64 platform, RSPM serves compiled Linux binaries of R packages and greatly speeds up package installs.\nNon-latest R version images installs all R packages from a fixed snapshot of CRAN mirror at a given date. This setting ensures that the same version of the R package is installed no matter when the installation is performed.\nProvides images that are generally smaller than the r-base series.\n\n\n\n\n\n\n\nNote\n\n\n\nThis document is for R 4.0.0 >= images. Please check the rocker-org/rocker-versioned repository for R <= 3.6.3 images." }, { - "objectID": "images/versioned/shiny.html#how-to-use", - "href": "images/versioned/shiny.html#how-to-use", - "title": "shiny, shiny-verse", - "section": "3 How to use", - "text": "3 How to use\n\n3.1 Environment variables\nSeveral special environment variables can be set to modify Shiny Server’s behavior.\n\n3.1.1 APPLICATION_LOGS_TO_STDOUT\nThe Shiny Server log and all application logs are written to stdout and can be viewed using the docker logs command.\nThe logs for individual apps are still kept in the /var/log/shiny-server directory1. If you want to avoid printing the logs to stdout, set the environment variable APPLICATION_LOGS_TO_STDOUT to false.\ndocker run --rm -ti -e APPLICATION_LOGS_TO_STDOUT=false -p 3838:3838 rocker/shiny\n\n\n\n3.2 Run by non-root user\nShiny Server is normally run by the root user, and sessions within the Shiny Server use the non-root user with UID 999 named shiny.\nBy setting the --user option as follows, Shiny Server can be run by the shiny user.\ndocker run --rm -ti --user shiny -p 3838:3838 rocker/shiny\n\n\n3.3 See also\n\nShared Volumes\nNetworking" + "objectID": "images/versioned/r-ver.html#special-tags", + "href": "images/versioned/r-ver.html#special-tags", + "title": "r-ver", + "section": "3 Special tags", + "text": "3 Special tags\n\n3.1 devel\nThe devel images are based on ubuntu:latest (the latest Ubuntu LTS version) and install the latest R-devel daily snapshot.\n\n\n3.2 cuda\nTags which contain cuda (e.g. rocker/r-ver:4.0.0-cuda10.1) are alias of rocker/cuda.\n\n\n\n\n\n\nWarning\n\n\n\ncuda tags will be discontinued in the future, so please use rocker/cuda instead." }, { - "objectID": "images/versioned/shiny.html#footnotes", - "href": "images/versioned/shiny.html#footnotes", - "title": "shiny, shiny-verse", + "objectID": "images/versioned/r-ver.html#how-to-use", + "href": "images/versioned/r-ver.html#how-to-use", + "title": "r-ver", + "section": "4 How to use", + "text": "4 How to use\n\n4.1 Switch the default CRAN mirror\nAs explained in the overview, rocker/r-ver may have set a past CRAN snapshot as the default repository. This is determined by the options set in the Rprofile. To use a different CRAN mirror, simply write a new setting in the Rprofile.\nFor example, the following Dockerfile sets the default repository to CRAN.\n\n\nDockerfile\n\nFROM rocker/r-ver:4\nRUN echo 'options(repos = c(CRAN = \"https://cloud.r-project.org\"))' >>\"${R_HOME}/etc/Rprofile.site\"\n\n\n\n\n\n\n\nTip\n\n\n\nTo do the same thing by a non-root user in a container, for example, the following command can be used.\n\n\nTerminal\n\necho 'options(repos = c(CRAN = \"https://cloud.r-project.org\"))' | sudo sh -c 'cat - >>\"${R_HOME}/etc/Rprofile.site\"'\n\n\n\n\n\n\n\n\n\nTip\n\n\n\nWe can also use the script setup_R.sh included in rocker/r-ver.\n\n\nDockerfile\n\nFROM rocker/r-ver:4\nRUN /rocker_scripts/setup_R.sh https://packagemanager.posit.co/cran/__linux__/jammy/2023-01-29\n\nThe advantage of using this script is that if you specify a URL for binary installation from Posit Public Package Manager (P3M), it will rewrite the URL and switch to source installation on non-amd64 platforms.\nFor example, in the above example, https://packagemanager.posit.co/cran/__linux__/jammy/2023-01-29 is set for the amd64 platform, but https://packagemanager.posit.co/cran/2023-01-29 is set for the arm64 platform as the default CRAN mirror.\n\n\nOr, if you want to temporarily change the CRAN mirror during an R session, use the options() function.\nA common use case is when developing an R package and using the devtools::check() function; if the CRAN mirror is not changed from the default, an error like cannot open URL 'packagemanager.posit.co/cran/__linux__/jammy/latest/web/packages/packages.rds': HTTP status was '404 Not Found' may occur.\n\n\nR Terminal\n\noptions(repos = c(CRAN = \"https://cloud.r-project.org\"))\ndevtools::check()\n\nIt is also possible to set up P3M and CRAN at the same time to achieve both binary installation and successful the devtools::check() function as follows. (rocker-org/rocker-versioned2#658)\n\n\nDockerfile\n\nFROM rocker/r-ver:4\nRUN echo 'options(repos = c(P3M = \"https://packagemanager.posit.co/cran/__linux__/jammy/latest\", CRAN = \"https://cloud.r-project.org\"))' >>\"${R_HOME}/etc/Rprofile.site\"\n\n\n\n4.2 Selecting the BLAS implementation used by R\nBy default rocker/r-ver uses the OpenBLAS implementation for Linear Algebra1. But it is possible to switch for the reference BLAS implementation (as provided by the Debian package libblas-dev) using the Shared BLAS setup2.\n\n\n\n\n\n\nImportant\n\n\n\nCalling Python numpy by the reticulate package on R using OpenBLAS may cause a segfault. This causes an error when trying to use Python packages like matplotlib or scikit-learn. (rocker-org/rocker-versioned2#471, numpy/numpy#21643)\nIf this error occurs, change the BLAS used by R to libblas as described below.\n\n\n\n4.2.1 Checking which BLAS is in use\nYou can see the current BLAS configuration for R by using sessionInfo() function in R console.\n\n\nR Terminal\n\nsessionInfo()\n#> R version 4.2.0 (2022-04-22)\n#> Platform: x86_64-pc-linux-gnu (64-bit)\n#> Running under: Ubuntu 20.04.4 LTS\n#>\n#> Matrix products: default\n#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\n#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3\n\nHere for instance R uses OpenBLAS.\n\n\n4.2.2 Switching BLAS implementations\nYou can switch BLAS used by R with the Debian update-alternatives script:\n\nSwitch to libblasSwitch to openblas\n\n\n\n\nTerminal\n\nARCH=$(uname -m)\nupdate-alternatives --set \"libblas.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/blas/libblas.so.3\"\nupdate-alternatives --set \"liblapack.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/lapack/liblapack.so.3\"\n\n\n\n\n\nTerminal\n\nARCH=$(uname -m)\nupdate-alternatives --set \"libblas.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/openblas-pthread/libblas.so.3\"\nupdate-alternatives --set \"liblapack.so.3-${ARCH}-linux-gnu\" \"/usr/lib/${ARCH}-linux-gnu/openblas-pthread/liblapack.so.3\"" + }, + { + "objectID": "images/versioned/r-ver.html#footnotes", + "href": "images/versioned/r-ver.html#footnotes", + "title": "r-ver", "section": "Footnotes", - "text": "Footnotes\n\n\nShiny Server Administrator’s Guide↩︎" + "text": "Footnotes\n\n\nR Installation and Administration A.3.1 BLAS↩︎\nR Installation and Administration A.3.1.4 Shared BLAS↩︎" }, { "objectID": "images/external.html", @@ -378,74 +427,81 @@ "text": "2 Other tools\n\n2.1 Mamba\nA package manager to install various packages from conda-forge and others.\nIf you use Mamba on Linux for R, it may be easier to install packages, see also the Extending images page.\n\n\n2.2 rig\nAn R Installation Manager (Previously known as rim).\nWith rig, you can easily install and switch between specific versions of R.\n\n\n2.3 rsi\nIntended for system administrators who want to perform a source-installation of R.\nIt is meant for installing official releases of R source code on Debian-based Linux distributions, e.g. Ubuntu, using a docker container." }, { - "objectID": "images/other/r-ubuntu.html", - "href": "images/other/r-ubuntu.html", - "title": "r-ubuntu", + "objectID": "images/index.html", + "href": "images/index.html", + "title": "The Rocker Images", "section": "", - "text": "Source repository: rocker-org/ubuntu-lts\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + "text": "The Rocker Project provides a collection of (Linux) containers suited for different needs. Find a base image to extend or images with popular software and optimized libraries pre-installed.\nGet the latest version or a reproducibly fixed environment." }, { - "objectID": "images/other/r-ubuntu.html#quick-reference", - "href": "images/other/r-ubuntu.html#quick-reference", - "title": "r-ubuntu", + "objectID": "images/index.html#overview", + "href": "images/index.html#overview", + "title": "The Rocker Images", "section": "", - "text": "Source repository: rocker-org/ubuntu-lts\nDockerfile\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + "text": "The Rocker Project provides a collection of (Linux) containers suited for different needs. Find a base image to extend or images with popular software and optimized libraries pre-installed.\nGet the latest version or a reproducibly fixed environment." }, { - "objectID": "images/other/r-ubuntu.html#overview", - "href": "images/other/r-ubuntu.html#overview", - "title": "r-ubuntu", - "section": "2 Overview", - "text": "2 Overview\nInstall current R and R packages on Ubuntu LTS, from PPA maintained by Michael Rutter. This image is close to r-base.\nYou can use apt to install binary R packages (r-cran-<package name>) along with its dependencies, as shown in the example below.\napt-get install -y --no-install-recommends r-cran-tidyverse" + "objectID": "images/index.html#images", + "href": "images/index.html#images", + "title": "The Rocker Images", + "section": "2 Images", + "text": "2 Images\n\n2.1 The versioned stack\n\n\n\nimage\nbase image\ndescription\npulls\n\n\n\n\nrocker/r-ver\nubuntu\nInstall R from source and set RSPM as default CRAN mirror\n\n\n\nrocker/rstudio\nrocker/r-ver\nAdds RStudio Server\n\n\n\nrocker/tidyverse\nrocker/rstudio\nAdds tidyverse packages & devtools\n\n\n\nrocker/verse\nrocker/tidyverse\nAdds tex & publishing-related package\n\n\n\nrocker/geospatial\nrocker/verse\nAdds geospatial packages\n\n\n\nrocker/binder\nrocker/geospatial\nAdds requirements to run repositories on mybinder.org\n\n\n\nrocker/shiny\nrocker/r-ver\nAdds shiny server\n\n\n\nrocker/shiny-verse\nrocker/shiny\nAdds tidyverse packages\n\n\n\nrocker/cuda\nrocker/r-ver\nAdds CUDA support to rocker/r-ver\n\n\n\nrocker/ml\nrocker/cuda\nAdds CUDA support to rocker/tidyverse\n\n\n\nrocker/ml-verse\nrocker/ml\nAdds CUDA support to rocker/geospatial\n\n\n\n\nThis stack builds on stable Debian releases (for R versions <= 3.6.3) or Ubuntu LTS (for R versions >= 4.0.0). Images in this stack accept a version tag specifying which version of R is desired, e.g. rocker/rstudio:4.0.0 for R 4.0.0. The latest tag always follows the latest release version of R.\nSome images (e.g. rocker/r-ver) also have the devel tag, which installs the development version of R.\nVersion-tagged images are designed to be stable, consistently providing the same versions of all software (R, R packages, system libraries) rather than the latest available, though Debian system libraries will still receive any security patches. Please check the document about versions for details.\n\n\n2.2 The base stack\n\n\n\nimage\nbase image\ndescription\npulls\n\n\n\n\nr-baserocker/r-base\ndebian:testing\nInstall current R from unstable repos\n\n\n\nrocker/r-devel\nr-base\nR-devel added side-by-side onto r-base (using alias RD)\n\n\n\nrocker/drd\nr-base\nLighter rocker/r-devel\n\n\n\nrocker/drp\nr-base\nR-patched added side-by-side onto r-base (using alias RP)\n\n\n\nrocker/r-devel-san\nr-base\nas rocker/r-devel, but built with compiler sanitizers\n\n\n\nrocker/r-devel-ubsan-clang\nr-base\nSanitizers, clang c compiler (instead of gcc)\n\n\n\n\nThis stack builds on debian:testing and Debian unstable repo. Use this stack if you want access to the latest versions of system libraries and compilers through apt-get.\nr-base (Docker Official image) and rocker/r-base are built from the same Dockerfile, but with different build tools.\n\n\n2.3 Additional images\n\n\n\nimage\nbase image\ndescription\npulls\n\n\n\n\nrocker/r-ubuntu\nubuntu\nClose to r-base, but based on ubuntu\n\n\n\nrocker/r-bspm\nr-base, rocker/r-ubuntu, archlinux, fedora, opensuse/tumbleweed\nBinary installation of R packages has been configured, powered by bspm\n\n\n\n\n\n\n2.4 Rocker Pre-built Dev Container Images\nImages built by the Dev Container CLI. See the Rocker Dev Container Images page for details." }, { - "objectID": "images/other/r-bspm.html", - "href": "images/other/r-bspm.html", - "title": "r-bspm", + "objectID": "use/rootless-podman.html", + "href": "use/rootless-podman.html", + "title": "Running without root privileges using Podman", "section": "", - "text": "Source repository: rocker-org/bspm\nDockerfile\n\nrocker/r-bspm:testing\nrocker/r-bspm:22.04\netc.\n\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + "text": "Docker traditionally ran as the root user. Users who wanted to run docker containers needed to be given sudo access and use sudo docker, or be added to the docker group, so they could run docker without typing sudo first. In both cases, they were running docker with root privileges. This is considered a bad security practice, because it effectively grants root host privileges to all docker users. However, namespaces and control groups where not as mature as they are now, and no better alternative was available.\nHowever today docker offers the possibility to run in rootless mode. Podman runs rootless by design.\nRunning a container rootless does not mean that the container does not have any root-like capabilities, it means that the container engine does not run as root. For most rocker-related projects, running rootless is a security advantage." }, { - "objectID": "images/other/r-bspm.html#quick-reference", - "href": "images/other/r-bspm.html#quick-reference", - "title": "r-bspm", - "section": "", - "text": "Source repository: rocker-org/bspm\nDockerfile\n\nrocker/r-bspm:testing\nrocker/r-bspm:22.04\netc.\n\ntags\n\nDockerHub\n\nPublished image details: not available\nNon-root default user: docker" + "objectID": "use/rootless-podman.html#who-am-i", + "href": "use/rootless-podman.html#who-am-i", + "title": "Running without root privileges using Podman", + "section": "1 Who am I?", + "text": "1 Who am I?\nAt the host:\n\n\nTerminal\n\nwhoami\n# sergio\n\nIn the container:\n\n\nTerminal\n\npodman run --rm docker.io/rocker/rstudio whoami\n# root" }, { - "objectID": "images/other/r-bspm.html#overview", - "href": "images/other/r-bspm.html#overview", - "title": "r-bspm", - "section": "2 Overview", - "text": "2 Overview\nbspm configured containers. Binary R packages can be easily installed. Based on Debian, Ubuntu, Fedora, and OpenSUSE.\nSimilar to r-base and rocker/r-ubuntu in that these can install R binary packages and system dependencies. but thanks to bspm, rocker/r-bspm automatically installs binary packages and system dependencies even when using the R install.packages() function." + "objectID": "use/rootless-podman.html#using-apt-get-inside-a-rootless-container", + "href": "use/rootless-podman.html#using-apt-get-inside-a-rootless-container", + "title": "Running without root privileges using Podman", + "section": "2 Using apt-get inside a rootless container", + "text": "2 Using apt-get inside a rootless container\nIt is perfectly possible to run apt-get commands on a rootless container, because it just modifies files inside the container.\nAt the host:\n\n\nTerminal\n\napt-get update\n# Reading package lists... Done\n# E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\n\nIn the container:\n\n\nTerminal\n\npodman run --rm docker.io/rocker/rstudio apt-get update\n# Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]\n# ...\n# Fetched 26.8 MB in 6s (4,750 kB/s)\n# Reading package lists..." }, { - "objectID": "images/other/index.html", - "href": "images/other/index.html", - "title": "Additional images", - "section": "", - "text": "r-bspm\n\n\n\n\n\n\n\n\n\n\n\n\n\nr-ubuntu\n\n\n\n\n\n\n\n\n\n\nNo matching items" + "objectID": "use/rootless-podman.html#modifying-files", + "href": "use/rootless-podman.html#modifying-files", + "title": "Running without root privileges using Podman", + "section": "3 Modifying files", + "text": "3 Modifying files\nYou can bind mount the /etc/ directory (e.g. using -v /etc:/hostetc) but you won’t be able to modify most of its files, since you are not allowed to do that when you are outside the container.\nAt the host:\n\n\nTerminal\n\ntouch /etc/try-creating-a-file\n# touch: cannot touch '/etc/try-creating-a-file': Permission denied\n\nIn the container: Rootless means no additional host permissions\n\n\nTerminal\n\npodman run --rm -v /etc/:/hostetc docker.io/rocker/rstudio \\\n touch /hostetc/try-creating-a-file\n# touch: cannot touch '/hostetc/try-creating-a-file': Permission denied\n\nHowever, you can modify the files within the container:\n\n\nTerminal\n\npodman run --rm docker.io/rocker/rstudio touch /etc/try-creating-a-file\n\nAnd files from mounted volumes, assuming you have the permissions where they are mounted at the host:\n\n\nTerminal\n\npodman run \\\n --rm \\\n --volume \"$HOME/workdir:/workdir\" \\\n docker.io/rocker/rstudio touch /workdir/try-creating-a-file\nls \"$HOME/workdir/try-creating-a-file\"\nrm \"$HOME/workdir/try-creating-a-file\"\n\nYour user in the host is mapped to the root user in the container." }, { - "objectID": "images/index.html", - "href": "images/index.html", - "title": "The Rocker Images", - "section": "", - "text": "The Rocker Project provides a collection of (Linux) containers suited for different needs. Find a base image to extend or images with popular software and optimized libraries pre-installed.\nGet the latest version or a reproducibly fixed environment." + "objectID": "use/rootless-podman.html#port-binding", + "href": "use/rootless-podman.html#port-binding", + "title": "Running without root privileges using Podman", + "section": "4 Port binding", + "text": "4 Port binding\nYou can’t bind your container to host ports lower than 1024, since those are reserved to root (or to be precise reserved to processes with CAP_NET_BIND_SERVICE capability set).\n\n\nTerminal\n\npodman run --rm -p 80:8787 docker.io/rocker/rstudio\n# Error: rootlessport cannot expose privileged port 80, you can add \n# 'net.ipv4.ip_unprivileged_port_start=80' to /etc/sysctl.conf (currently 1024),\n# or choose a larger port number (>= 1024):\n# listen tcp 0.0.0.0:80: bind: permission denied\n\nHowever larger port numbers work perfectly fine:\n\n\nTerminal\n\npodman run --rm -p 8787:8787 docker.io/rocker/rstudio" }, { - "objectID": "images/index.html#overview", - "href": "images/index.html#overview", - "title": "The Rocker Images", + "objectID": "use/rootless-podman.html#mounting-shared-data-from-an-additional-group", + "href": "use/rootless-podman.html#mounting-shared-data-from-an-additional-group", + "title": "Running without root privileges using Podman", + "section": "5 Mounting shared data from an additional group", + "text": "5 Mounting shared data from an additional group\nYou may want to mount a directory from a group you belong to, to be able to read and write into it. Let’s say you are ana and you belong to the rfriends group in the host. That group has access to the /shared_data folder, that you would like to access from your container.\n\n\n\n\n\n\nTip\n\n\n\nTo run R code or an R script using rocker accessing a shared directory, you can skip the instructions below and manage to work on the command line. However, you won’t be able to access that directory if you try to login from RStudio’s web browser. It will only work from process launched from the command line.\n\n\nTerminal\n\npodman run \n -ti \\\n --rm \\\n --group-add keep-groups \\\n -v /shared_dir:/shared_dir \\\n docker.io/rocker/rstudio R\n\n\n\n\nFind out the group ID (GID) of the rfriends group.\n\n\nTerminal\n\ngetent group rfriends\nrfriends:x:2000:ana,sergio\n\nThe GID is 2000, and both ana and sergio belong to it.\nSubordinate that GID to your user. You will need administrative permissions:\n\n\nTerminal\n\nsudo usermod --add-subgids 2000-2000 ana\n\nUpdate your Podman rootless namespace:\n\n\nTerminal\n\npodman system migrate\n\n\nYou are now able to map the group in the container. How? That depends on your Podman version:\n\n5.1 Podman versions 4.7 and above\nTo run your container mapping your host GID 2000 to a container GID combine the --group-add keep-groups with the --gidmap option:\n\n\nTerminal\n\npodman run \\\n --rm \\\n --group-add keep-groups \\\n --gidmap=\"+g102000:@2000\" \\\n --volume /shared_dir:/shared_dir \\\n docker.io/rocker/rstudio\n\nYou will have used --group-add keep-groups so the user in the container still belongs to the subordinated group. The --gidmap argument takes care of appending the mapping of group 2000 from the host to group 102000 in the container. Additioning 100 000 to your GID is an easy way to remember the container GID and avoid collisions with lower container GIDs.\n\n\n5.2 Podman versions below 4.7\nThe command will look like:\n\n\nTerminal\n\npodman run \\\n --rm \\\n --group-add keep-groups \\\n --uidmap \"0:0:65535\" \\\n --gidmap \"0:0:1\" \\\n --gidmap \"102000:1:1\" \\\n --gidmap \"1:2:60000\" \\\n --volume /shared_dir:/shared_dir \\\n docker.io/rocker/rstudio\n\nYou can notice several differences in the idmapping command:\n\nYou must provide a default user id mapping: --uidmap \"0:0:65535\"\nYou must provide a full group id mapping:\n\nThe group id mapping should map intermediate GID 0 to container GID 0. --gidmap \"0:0:1\" This maps your user to root.\nYou must find out the intermediate GID mapping for the GID you want to map (using podman unshare cat /proc/self/gid_map).\n\n\nTerminal\n\npodman unshare cat /proc/self/gid_map\n# 0 1000 1\n# 1 2000 1\n# 2 100000 65536\n\nBy looking at the table above, you can find host GID 2000 in the middle column and see it is mapped to intermediate id 1 in the left column.\nSo your mapping must include intermediate GID 1 to container GID 102000: --gidmap 102000:1:1\nAnd you must map container IDs from 1 to n, using free intermediate GIDs. Here we map 60000: --gidmap \"1:2:60000\".\n\n\nAnd happy coding!" + }, + { + "objectID": "use/shared_volumes.html", + "href": "use/shared_volumes.html", + "title": "Shared Volumes", "section": "", - "text": "The Rocker Project provides a collection of (Linux) containers suited for different needs. Find a base image to extend or images with popular software and optimized libraries pre-installed.\nGet the latest version or a reproducibly fixed environment." + "text": "Docker volumes and bind mounts are mechanisms for persisting data generated by and used by Docker containers.\nThese are widely used, but bind mounts, which mounts files and directories on the host machine on the container, are prone to problems due to Linux file system permissions and should be used with caution." }, { - "objectID": "images/index.html#images", - "href": "images/index.html#images", - "title": "The Rocker Images", - "section": "2 Images", - "text": "2 Images\n\n2.1 The versioned stack\n\n\n\nimage\nbase image\ndescription\npulls\n\n\n\n\nrocker/r-ver\nubuntu\nInstall R from source and set RSPM as default CRAN mirror\n\n\n\nrocker/rstudio\nrocker/r-ver\nAdds RStudio Server\n\n\n\nrocker/tidyverse\nrocker/rstudio\nAdds tidyverse packages & devtools\n\n\n\nrocker/verse\nrocker/tidyverse\nAdds tex & publishing-related package\n\n\n\nrocker/geospatial\nrocker/verse\nAdds geospatial packages\n\n\n\nrocker/binder\nrocker/geospatial\nAdds requirements to run repositories on mybinder.org\n\n\n\nrocker/shiny\nrocker/r-ver\nAdds shiny server\n\n\n\nrocker/shiny-verse\nrocker/shiny\nAdds tidyverse packages\n\n\n\nrocker/cuda\nrocker/r-ver\nAdds CUDA support to rocker/r-ver\n\n\n\nrocker/ml\nrocker/cuda\nAdds CUDA support to rocker/tidyverse\n\n\n\nrocker/ml-verse\nrocker/ml\nAdds CUDA support to rocker/geospatial\n\n\n\n\nThis stack builds on stable Debian releases (for R versions <= 3.6.3) or Ubuntu LTS (for R versions >= 4.0.0). Images in this stack accept a version tag specifying which version of R is desired, e.g. rocker/rstudio:4.0.0 for R 4.0.0. The latest tag always follows the latest release version of R.\nSome images (e.g. rocker/r-ver) also have the devel tag, which installs the development version of R.\nVersion-tagged images are designed to be stable, consistently providing the same versions of all software (R, R packages, system libraries) rather than the latest available, though Debian system libraries will still receive any security patches. Please check the document about versions for details.\n\n\n2.2 The base stack\n\n\n\nimage\nbase image\ndescription\npulls\n\n\n\n\nr-baserocker/r-base\ndebian:testing\nInstall current R from unstable repos\n\n\n\nrocker/r-devel\nr-base\nR-devel added side-by-side onto r-base (using alias RD)\n\n\n\nrocker/drd\nr-base\nLighter rocker/r-devel\n\n\n\nrocker/drp\nr-base\nR-patched added side-by-side onto r-base (using alias RP)\n\n\n\nrocker/r-devel-san\nr-base\nas rocker/r-devel, but built with compiler sanitizers\n\n\n\nrocker/r-devel-ubsan-clang\nr-base\nSanitizers, clang c compiler (instead of gcc)\n\n\n\n\nThis stack builds on debian:testing and Debian unstable repo. Use this stack if you want access to the latest versions of system libraries and compilers through apt-get.\nr-base (Docker Official image) and rocker/r-base are built from the same Dockerfile, but with different build tools.\n\n\n2.3 Additional images\n\n\n\nimage\nbase image\ndescription\npulls\n\n\n\n\nrocker/r-ubuntu\nubuntu\nClose to r-base, but based on ubuntu\n\n\n\nrocker/r-bspm\nr-base, rocker/r-ubuntu, archlinux, fedora, opensuse/tumbleweed\nBinary installation of R packages has been configured, powered by bspm\n\n\n\n\n\n\n2.4 Rocker Pre-built Dev Container Images\nImages built by the Dev Container CLI. See the Rocker Dev Container Images page for details." + "objectID": "use/shared_volumes.html#bind-mounts", + "href": "use/shared_volumes.html#bind-mounts", + "title": "Shared Volumes", + "section": "1 Bind mounts", + "text": "1 Bind mounts\nWhen a Linux file system is bind-mounted to a Linux container, the UID and GID of the user who owns the file will match both inside and outside the container.\nGenerally, the UID is matched by creating a user in the container with the same UID as the host machine and specifying that user in the docker run’s --user option to enter the container.\nA default (UID 1000) user has already been created for many of the Rocker images. Check the image reference page for more information.\nFor example, r-base’s default user is named docker.\ndocker run --rm -ti --user docker r-base bash\nIf a user with UID 1000 wants to bind-mount the “work” directory in the current directory to r-base and work on it, they can use the following command to work in the container and not worry about the permission being overwritten.\ndocker run --rm -ti --user docker -v \"$(pwd)\"/work:/workspace r-base bash\n\n\n\n\n\n\nImportant\n\n\n\nrocker/rstudio etc. requires the root user to execute the /init command to start RStudio Server. So, do not set the --user option if you want to use RStudio Server.\nInstead, the UID and GID of the default user for logging into RStudio can be changed at container start by specifying environment variables. Please check the reference page." }, { "objectID": "use/extending.html", @@ -475,27 +531,6 @@ "section": "Footnotes", "text": "Footnotes\n\n\nPosit Package Manager: Admin Guide↩︎" }, - { - "objectID": "use/gui.html", - "href": "use/gui.html", - "title": "GUI", - "section": "", - "text": "If you do not use a web-based IDE (like RStudio Server, Jupyter, VSCode, etc.) with integrated graphics devices, the following additional configuration is required to display plots of R running in your container." - }, - { - "objectID": "use/gui.html#the-httpgd-r-package", - "href": "use/gui.html#the-httpgd-r-package", - "title": "GUI", - "section": "1 The httpgd R package", - "text": "1 The httpgd R package\nhttpgd is a graphics device for R that is accessible via HTTP.\nStart the httpgd server in the container that published a port, and you can access the plot viewer in your browser.\nFor example, you can create a container with the following command and start the httpgd server from within the R terminal.\n\n\nTerminal\n\ndocker run --rm -ti -p 8000:8000 ghcr.io/rocker-org/devcontainer/r-ver:4 R\n\n\n\nR Terminal\n\nhttpgd::hgd(host = \"0.0.0.0\", port = 8000)\nplot(mtcars)\n\n\n\n\n\n\n\nTip\n\n\n\nDocker images built from the rocker-org/devcontainer-images repository are httpgd pre-installed.\n\n\nFor details, please check the httpgd’s vignette for Docker." - }, - { - "objectID": "use/gui.html#x11", - "href": "use/gui.html#x11", - "title": "GUI", - "section": "2 X11", - "text": "2 X11\n\n\n\n\n\n\nImportant\n\n\n\nWhile this approach is generic, it is often difficult to configure or perform well, especially on non-Linux operating systems.\n\n\nX11 forwarding by connecting the X11 server in the container to the X11 client on the local machine.\nCommands vary depending on the situation, but for example, the commands like below are used.\n\n\nTerminal\n\ndocker run --rm -ti -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix <imagename> R" - }, { "objectID": "use/networking.html", "href": "use/networking.html", @@ -553,67 +588,25 @@ "text": "3 VSCode\nVisual Studio Code - Open Source (Code - OSS) is currently one of the most popular editors.\nWhen editing R in VSCode, vscode-R is a popular extension. This extension is recommended to be used with languageserver and httpgd.\n\n3.1 Visual Studio Code Dev Containers\nThe Microsoft’s Code OSS distribution, Visual Studio Code, has an extension, Dev Containers. (Formerly known as “Remote - Containers”.)\nThat makes a container the backend, which can be used to develop using software in the container.\nThe Dev Containers extension builds images from definition files and creates containers with installed VSCode Server and vscode extensions. Users can run the container and start working inside it without touching anything but the local VSCode.\nThe Dev Containers extension can load and use templates published on the web. The R’s definition is this, which installs languageserver and httpgd, and also installs radian as R console.\nThis definition can also be used in GitHub Codespaces.\nSee also\n\nDev Container Templates\nDev Container Images\nDev Container Features\n\n\n\n3.2 coder/code-server and gitpod-io/openvscode-server\nBoth coder’s code-server and gitpod’s openvscode-server can run Code - OSS server-side and you can use it from the browser. To use them in a Docker container, they must be installed in the container." }, { - "objectID": "use/shared_volumes.html", - "href": "use/shared_volumes.html", - "title": "Shared Volumes", - "section": "", - "text": "Docker volumes and bind mounts are mechanisms for persisting data generated by and used by Docker containers.\nThese are widely used, but bind mounts, which mounts files and directories on the host machine on the container, are prone to problems due to Linux file system permissions and should be used with caution." - }, - { - "objectID": "use/shared_volumes.html#bind-mounts", - "href": "use/shared_volumes.html#bind-mounts", - "title": "Shared Volumes", - "section": "1 Bind mounts", - "text": "1 Bind mounts\nWhen a Linux file system is bind-mounted to a Linux container, the UID and GID of the user who owns the file will match both inside and outside the container.\nGenerally, the UID is matched by creating a user in the container with the same UID as the host machine and specifying that user in the docker run’s --user option to enter the container.\nA default (UID 1000) user has already been created for many of the Rocker images. Check the image reference page for more information.\nFor example, r-base’s default user is named docker.\ndocker run --rm -ti --user docker r-base bash\nIf a user with UID 1000 wants to bind-mount the “work” directory in the current directory to r-base and work on it, they can use the following command to work in the container and not worry about the permission being overwritten.\ndocker run --rm -ti --user docker -v \"$(pwd)\"/work:/workspace r-base bash\n\n\n\n\n\n\nImportant\n\n\n\nrocker/rstudio etc. requires the root user to execute the /init command to start RStudio Server. So, do not set the --user option if you want to use RStudio Server.\nInstead, the UID and GID of the default user for logging into RStudio can be changed at container start by specifying environment variables. Please check the reference page." - }, - { - "objectID": "use/index.html", - "href": "use/index.html", - "title": "Use", - "section": "", - "text": "Edit in containers\n\n\n2 min\n\n\nEdit R code in the containers.\n\n\n\n\n\n\n\n\n\n\nExtending images\n\n\n6 min\n\n\nInstall your favorite packages on the containers.\n\n\n\n\n\n\n\n\n\n\nGUI\n\n\n1 min\n\n\nView plots etc. from the containers.\n\n\n\n\n\n\n\n\n\n\nNetworking\n\n\n3 min\n\n\nConnect R containers to networks.\n\n\n\n\n\n\n\n\n\n\nReproducibility\n\n\n1 min\n\n\nReproducibility of Rocker Containers.\n\n\n\n\n\n\n\n\n\n\nRunning without root privileges using Podman\n\n\n6 min\n\n\nRootless containers and rocker\n\n\n\n\n\n\n\n\n\n\nShared Volumes\n\n\n2 min\n\n\nUse docker volumes and bind mounts to save files.\n\n\n\n\n\n\n\n\n\n\nSingularity\n\n\n5 min\n\n\nRun RStudio Server containers by Singularity.\n\n\n\n\n\n\n\nNo matching items" - }, - { - "objectID": "use/rootless-podman.html", - "href": "use/rootless-podman.html", - "title": "Running without root privileges using Podman", + "objectID": "use/gui.html", + "href": "use/gui.html", + "title": "GUI", "section": "", - "text": "Docker traditionally ran as the root user. Users who wanted to run docker containers needed to be given sudo access and use sudo docker, or be added to the docker group, so they could run docker without typing sudo first. In both cases, they were running docker with root privileges. This is considered a bad security practice, because it effectively grants root host privileges to all docker users. However, namespaces and control groups where not as mature as they are now, and no better alternative was available.\nHowever today docker offers the possibility to run in rootless mode. Podman runs rootless by design.\nRunning a container rootless does not mean that the container does not have any root-like capabilities, it means that the container engine does not run as root. For most rocker-related projects, running rootless is a security advantage." - }, - { - "objectID": "use/rootless-podman.html#who-am-i", - "href": "use/rootless-podman.html#who-am-i", - "title": "Running without root privileges using Podman", - "section": "1 Who am I?", - "text": "1 Who am I?\nAt the host:\n\n\nTerminal\n\nwhoami\n# sergio\n\nIn the container:\n\n\nTerminal\n\npodman run --rm docker.io/rocker/rstudio whoami\n# root" - }, - { - "objectID": "use/rootless-podman.html#using-apt-get-inside-a-rootless-container", - "href": "use/rootless-podman.html#using-apt-get-inside-a-rootless-container", - "title": "Running without root privileges using Podman", - "section": "2 Using apt-get inside a rootless container", - "text": "2 Using apt-get inside a rootless container\nIt is perfectly possible to run apt-get commands on a rootless container, because it just modifies files inside the container.\nAt the host:\n\n\nTerminal\n\napt-get update\n# Reading package lists... Done\n# E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\n\nIn the container:\n\n\nTerminal\n\npodman run --rm docker.io/rocker/rstudio apt-get update\n# Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]\n# ...\n# Fetched 26.8 MB in 6s (4,750 kB/s)\n# Reading package lists..." - }, - { - "objectID": "use/rootless-podman.html#modifying-files", - "href": "use/rootless-podman.html#modifying-files", - "title": "Running without root privileges using Podman", - "section": "3 Modifying files", - "text": "3 Modifying files\nYou can bind mount the /etc/ directory (e.g. using -v /etc:/hostetc) but you won’t be able to modify most of its files, since you are not allowed to do that when you are outside the container.\nAt the host:\n\n\nTerminal\n\ntouch /etc/try-creating-a-file\n# touch: cannot touch '/etc/try-creating-a-file': Permission denied\n\nIn the container: Rootless means no additional host permissions\n\n\nTerminal\n\npodman run --rm -v /etc/:/hostetc docker.io/rocker/rstudio \\\n touch /hostetc/try-creating-a-file\n# touch: cannot touch '/hostetc/try-creating-a-file': Permission denied\n\nHowever, you can modify the files within the container:\n\n\nTerminal\n\npodman run --rm docker.io/rocker/rstudio touch /etc/try-creating-a-file\n\nAnd files from mounted volumes, assuming you have the permissions where they are mounted at the host:\n\n\nTerminal\n\npodman run \\\n --rm \\\n --volume \"$HOME/workdir:/workdir\" \\\n docker.io/rocker/rstudio touch /workdir/try-creating-a-file\nls \"$HOME/workdir/try-creating-a-file\"\nrm \"$HOME/workdir/try-creating-a-file\"\n\nYour user in the host is mapped to the root user in the container." + "text": "If you do not use a web-based IDE (like RStudio Server, Jupyter, VSCode, etc.) with integrated graphics devices, the following additional configuration is required to display plots of R running in your container." }, { - "objectID": "use/rootless-podman.html#port-binding", - "href": "use/rootless-podman.html#port-binding", - "title": "Running without root privileges using Podman", - "section": "4 Port binding", - "text": "4 Port binding\nYou can’t bind your container to host ports lower than 1024, since those are reserved to root (or to be precise reserved to processes with CAP_NET_BIND_SERVICE capability set).\n\n\nTerminal\n\npodman run --rm -p 80:8787 docker.io/rocker/rstudio\n# Error: rootlessport cannot expose privileged port 80, you can add \n# 'net.ipv4.ip_unprivileged_port_start=80' to /etc/sysctl.conf (currently 1024),\n# or choose a larger port number (>= 1024):\n# listen tcp 0.0.0.0:80: bind: permission denied\n\nHowever larger port numbers work perfectly fine:\n\n\nTerminal\n\npodman run --rm -p 8787:8787 docker.io/rocker/rstudio" + "objectID": "use/gui.html#the-httpgd-r-package", + "href": "use/gui.html#the-httpgd-r-package", + "title": "GUI", + "section": "1 The httpgd R package", + "text": "1 The httpgd R package\nhttpgd is a graphics device for R that is accessible via HTTP.\nStart the httpgd server in the container that published a port, and you can access the plot viewer in your browser.\nFor example, you can create a container with the following command and start the httpgd server from within the R terminal.\n\n\nTerminal\n\ndocker run --rm -ti -p 8000:8000 ghcr.io/rocker-org/devcontainer/r-ver:4 R\n\n\n\nR Terminal\n\nhttpgd::hgd(host = \"0.0.0.0\", port = 8000)\nplot(mtcars)\n\n\n\n\n\n\n\nTip\n\n\n\nDocker images built from the rocker-org/devcontainer-images repository are httpgd pre-installed.\n\n\nFor details, please check the httpgd’s vignette for Docker." }, { - "objectID": "use/rootless-podman.html#mounting-shared-data-from-an-additional-group", - "href": "use/rootless-podman.html#mounting-shared-data-from-an-additional-group", - "title": "Running without root privileges using Podman", - "section": "5 Mounting shared data from an additional group", - "text": "5 Mounting shared data from an additional group\nYou may want to mount a directory from a group you belong to, to be able to read and write into it. Let’s say you are ana and you belong to the rfriends group in the host. That group has access to the /shared_data folder, that you would like to access from your container.\n\n\n\n\n\n\nTip\n\n\n\nTo run R code or an R script using rocker accessing a shared directory, you can skip the instructions below and manage to work on the command line. However, you won’t be able to access that directory if you try to login from RStudio’s web browser. It will only work from process launched from the command line.\n\n\nTerminal\n\npodman run \n -ti \\\n --rm \\\n --group-add keep-groups \\\n -v /shared_dir:/shared_dir \\\n docker.io/rocker/rstudio R\n\n\n\n\nFind out the group ID (GID) of the rfriends group.\n\n\nTerminal\n\ngetent group rfriends\nrfriends:x:2000:ana,sergio\n\nThe GID is 2000, and both ana and sergio belong to it.\nSubordinate that GID to your user. You will need administrative permissions:\n\n\nTerminal\n\nsudo usermod --add-subgids 2000-2000 ana\n\nUpdate your Podman rootless namespace:\n\n\nTerminal\n\npodman system migrate\n\n\nYou are now able to map the group in the container. How? That depends on your Podman version:\n\n5.1 Podman versions 4.7 and above\nTo run your container mapping your host GID 2000 to a container GID combine the --group-add keep-groups with the --gidmap option:\n\n\nTerminal\n\npodman run \\\n --rm \\\n --group-add keep-groups \\\n --gidmap=\"+g102000:@2000\" \\\n --volume /shared_dir:/shared_dir \\\n docker.io/rocker/rstudio\n\nYou will have used --group-add keep-groups so the user in the container still belongs to the subordinated group. The --gidmap argument takes care of appending the mapping of group 2000 from the host to group 102000 in the container. Additioning 100 000 to your GID is an easy way to remember the container GID and avoid collisions with lower container GIDs.\n\n\n5.2 Podman versions below 4.7\nThe command will look like:\n\n\nTerminal\n\npodman run \\\n --rm \\\n --group-add keep-groups \\\n --uidmap \"0:0:65535\" \\\n --gidmap \"0:0:1\" \\\n --gidmap \"102000:1:1\" \\\n --gidmap \"1:2:60000\" \\\n --volume /shared_dir:/shared_dir \\\n docker.io/rocker/rstudio\n\nYou can notice several differences in the idmapping command:\n\nYou must provide a default user id mapping: --uidmap \"0:0:65535\"\nYou must provide a full group id mapping:\n\nThe group id mapping should map intermediate GID 0 to container GID 0. --gidmap \"0:0:1\" This maps your user to root.\nYou must find out the intermediate GID mapping for the GID you want to map (using podman unshare cat /proc/self/gid_map).\n\n\nTerminal\n\npodman unshare cat /proc/self/gid_map\n# 0 1000 1\n# 1 2000 1\n# 2 100000 65536\n\nBy looking at the table above, you can find host GID 2000 in the middle column and see it is mapped to intermediate id 1 in the left column.\nSo your mapping must include intermediate GID 1 to container GID 102000: --gidmap 102000:1:1\nAnd you must map container IDs from 1 to n, using free intermediate GIDs. Here we map 60000: --gidmap \"1:2:60000\".\n\n\nAnd happy coding!" + "objectID": "use/gui.html#x11", + "href": "use/gui.html#x11", + "title": "GUI", + "section": "2 X11", + "text": "2 X11\n\n\n\n\n\n\nImportant\n\n\n\nWhile this approach is generic, it is often difficult to configure or perform well, especially on non-Linux operating systems.\n\n\nX11 forwarding by connecting the X11 server in the container to the X11 client on the local machine.\nCommands vary depending on the situation, but for example, the commands like below are used.\n\n\nTerminal\n\ndocker run --rm -ti -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix <imagename> R" }, { "objectID": "use/reproducibility.html", @@ -671,6 +664,13 @@ "section": "5 SLURM job script", "text": "5 SLURM job script\nOn an HPC cluster, a Rocker Singularity container can be started on a compute node using the cluster’s job scheduler, allowing it to access compute, memory, and storage resources that may far exceed those found in a typical desktop workstation. A per-user /tmp should be bind-mounted when running on a multi-tenant HPC cluster that has singularity configured to bind mount the host /tmp, to avoid an existing /tmp/rstudio-server owned by another user.\nThe following example illustrates how this may be done with a SLURM job script.\n#!/bin/sh\n#SBATCH --time=08:00:00\n#SBATCH --signal=USR2\n#SBATCH --ntasks=1\n#SBATCH --cpus-per-task=2\n#SBATCH --mem=8192\n#SBATCH --output=/home/%u/rstudio-server.job.%j\n# customize --output path as appropriate (to a directory readable only by the user!)\n\n# Create temporary directory to be populated with directories to bind-mount in the container\n# where writable file systems are necessary. Adjust path as appropriate for your computing environment.\nworkdir=$(python -c 'import tempfile; print(tempfile.mkdtemp())')\n\nmkdir -p -m 700 ${workdir}/run ${workdir}/tmp ${workdir}/var/lib/rstudio-server\ncat > ${workdir}/database.conf <<END\nprovider=sqlite\ndirectory=/var/lib/rstudio-server\nEND\n\n# Set OMP_NUM_THREADS to prevent OpenBLAS (and any other OpenMP-enhanced\n# libraries used by R) from spawning more threads than the number of processors\n# allocated to the job.\n#\n# Set R_LIBS_USER to a path specific to rocker/rstudio to avoid conflicts with\n# personal libraries from any R installation in the host environment\n\ncat > ${workdir}/rsession.sh <<END\n#!/bin/sh\nexport OMP_NUM_THREADS=${SLURM_JOB_CPUS_PER_NODE}\nexport R_LIBS_USER=${HOME}/R/rocker-rstudio/4.2\nexec /usr/lib/rstudio-server/bin/rsession \"\\${@}\"\nEND\n\nchmod +x ${workdir}/rsession.sh\n\nexport SINGULARITY_BIND=\"${workdir}/run:/run,${workdir}/tmp:/tmp,${workdir}/database.conf:/etc/rstudio/database.conf,${workdir}/rsession.sh:/etc/rstudio/rsession.sh,${workdir}/var/lib/rstudio-server:/var/lib/rstudio-server\"\n\n# Do not suspend idle sessions.\n# Alternative to setting session-timeout-minutes=0 in /etc/rstudio/rsession.conf\n# https://github.com/rstudio/rstudio/blob/v1.4.1106/src/cpp/server/ServerSessionManager.cpp#L126\nexport SINGULARITYENV_RSTUDIO_SESSION_TIMEOUT=0\n\nexport SINGULARITYENV_USER=$(id -un)\nexport SINGULARITYENV_PASSWORD=$(openssl rand -base64 15)\n# get unused socket per https://unix.stackexchange.com/a/132524\n# tiny race condition between the python & singularity commands\nreadonly PORT=$(python -c 'import socket; s=socket.socket(); s.bind((\"\", 0)); print(s.getsockname()[1]); s.close()')\ncat 1>&2 <<END\n1. SSH tunnel from your workstation using the following command:\n\n ssh -N -L 8787:${HOSTNAME}:${PORT} ${SINGULARITYENV_USER}@LOGIN-HOST\n\n and point your web browser to http://localhost:8787\n\n2. log in to RStudio Server using the following credentials:\n\n user: ${SINGULARITYENV_USER}\n password: ${SINGULARITYENV_PASSWORD}\n\nWhen done using RStudio Server, terminate the job by:\n\n1. Exit the RStudio Session (\"power\" button in the top right corner of the RStudio window)\n2. Issue the following command on the login node:\n\n scancel -f ${SLURM_JOB_ID}\nEND\n\nsingularity exec --cleanenv rstudio_4.2.sif \\\n /usr/lib/rstudio-server/bin/rserver --www-port ${PORT} \\\n --auth-none=0 \\\n --auth-pam-helper-path=pam-helper \\\n --auth-stay-signed-in-days=30 \\\n --auth-timeout-minutes=0 \\\n --rsession-path=/etc/rstudio/rsession.sh\nprintf 'rserver exited' 1>&2\nThe job script is submitted using the SLURM sbatch command:\n$ sbatch rstudio-server.job\nSubmitted batch job 123456\nAfter the scheduled job begins execution, rserver is started in a Singularity container, and the connection information (including the compute node hostname, TCP port, and a randomly-generated custom password) is sent in the job script stderr to a file in the user’s home directory named rstudio-server.job.123456.\nThe rserver process (and resulting rsession process after login) will persist until:\n\nThe job wall time (--time=08:00:00, or 8 hours) is reached.\n\nThe --signal=USR2 directive tells SLURM to send SIGUSR2 approximately 60 seconds before the wall time limit is reached. This causes the rsession process to save user’s session state to their home directory, so it can be resumed in a subsequent job.\n\nThe SLURM scancel command is used to cancel the job." }, + { + "objectID": "use/index.html", + "href": "use/index.html", + "title": "Use", + "section": "", + "text": "Edit in containers\n\n\n2 min\n\n\nEdit R code in the containers.\n\n\n\n\n\n\n\n\n\n\nExtending images\n\n\n6 min\n\n\nInstall your favorite packages on the containers.\n\n\n\n\n\n\n\n\n\n\nGUI\n\n\n1 min\n\n\nView plots etc. from the containers.\n\n\n\n\n\n\n\n\n\n\nNetworking\n\n\n3 min\n\n\nConnect R containers to networks.\n\n\n\n\n\n\n\n\n\n\nReproducibility\n\n\n1 min\n\n\nReproducibility of Rocker Containers.\n\n\n\n\n\n\n\n\n\n\nRunning without root privileges using Podman\n\n\n6 min\n\n\nRootless containers and rocker\n\n\n\n\n\n\n\n\n\n\nShared Volumes\n\n\n2 min\n\n\nUse docker volumes and bind mounts to save files.\n\n\n\n\n\n\n\n\n\n\nSingularity\n\n\n5 min\n\n\nRun RStudio Server containers by Singularity.\n\n\n\n\n\n\n\nNo matching items" + }, { "objectID": "CODE_OF_CONDUCT.html", "href": "CODE_OF_CONDUCT.html", diff --git a/use/index.html b/use/index.html index 8a8f32c..630f202 100644 --- a/use/index.html +++ b/use/index.html @@ -308,7 +308,7 @@

Use