Tag | Base Image | Operating System | R ver | CmdStan |
---|---|---|---|---|
latest | rocker/rstudio | "noble" (Ubuntu 24.04) | 4.4.2 | 2.36.0 |
4.4.2 | rocker/rstudio | "noble" (Ubuntu 24.04) | 4.4.2 | 2.36.0 |
4.4.1 | rocker/rstudio | "jammy" (Ubuntu 22.04) | 4.4.1 | 2.35.0 |
- cmdstanr (newest on https://stan-dev.r-universe.dev/builds)
- rstan (newest on https://stan-dev.r-universe.dev/builds)
- data.table (newest on CRAN)
- tidyverse (newest on CRAN)
- bayesplot (newest on https://stan-dev.r-universe.dev/builds)
- easystats (newest on CRAN)
- ggeffects (newest on CRAN)
- shinystan (newest on https://stan-dev.r-universe.dev/builds)
- tidybayes (newest on CRAN)
Most users will want to just install Docker Desktop, pull the image, and run it.
docker pull jmgirard/rocker-bayes
docker run -e PASSWORD=pass -p 8787:8787 jmgirard/rocker-bayes
Then navigate to http://localhost:8787 in your web browser and enter "rstudio" and "pass".
Use volumes or bind mounts to grant the container access to persistent storage or host directories.
You could also download the Dockerfile from GitHub and build it yourself.
git clone https://github.com/jmgirard/rocker-bayes.git
cd rocker-bayes
docker-compose up --build -d
Then navigate to http://localhost:8787 in your web browser and enter "rstudio" and "pass".
You can also customize the port and password by editing .env
in a text editor.
Note that this small model won't get much benefit from within-chain parallelization.
It's just used to quickly test that everything is working.
library(brms)
fit_serial <- brm(
count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy, family = poisson(),
chains = 4, cores = 4, backend = "cmdstanr"
)
fit_parallel <- update(
fit_serial, chains = 2, cores = 2,
backend = "cmdstanr", threads = threading(2)
)