https://github.com/jbris/stan-cmdstanr-gpu-docker
A Docker image to run Stan, cmdstanr, and brms for Bayesian statistical modelling. GPU support using OpenCL is available.
https://github.com/jbris/stan-cmdstanr-gpu-docker
bayes bayesian-inference brms cmdstan cmdstanr data-science docker posterior probabilistic-programming projpred rstan rstanarm shinystan stan stan-gpu stan-lang stan-math-library tidybayes tidyverse
Last synced: 5 months ago
JSON representation
A Docker image to run Stan, cmdstanr, and brms for Bayesian statistical modelling. GPU support using OpenCL is available.
- Host: GitHub
- URL: https://github.com/jbris/stan-cmdstanr-gpu-docker
- Owner: JBris
- License: mit
- Created: 2023-06-22T04:00:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-11T12:38:29.000Z (9 months ago)
- Last Synced: 2025-04-08T14:11:45.711Z (6 months ago)
- Topics: bayes, bayesian-inference, brms, cmdstan, cmdstanr, data-science, docker, posterior, probabilistic-programming, projpred, rstan, rstanarm, shinystan, stan, stan-gpu, stan-lang, stan-math-library, tidybayes, tidyverse
- Language: Dockerfile
- Homepage: https://jbris.github.io/stan-cmdstanr-gpu-docker/
- Size: 32.2 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# stan-cmdstanr-gpu-docker
[](https://github.com/JBris/stan-cmdstanr-gpu-docker/actions/workflows/pages/pages-build-deployment)
## Table of Contents
- [stan-cmdstanr-gpu-docker](#stan-cmdstanr-gpu-docker)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Stan](#stan)
- [Docker](#docker)### Introduction
A Docker image to run Stan, cmdstanr, and brms for Bayesian statistical modelling - with GPU support.
Launch an RStudio webserver using `bash stan_up.sh`.
Execute `bash docker_pull.sh` to pull the image.
To convert the image into an Apptainer image, run `bash apptainer_pull.sh`.
### Stan
The following packages are installed during the image build process:
* [Stan](https://mc-stan.org/)
* [rstan](https://mc-stan.org/users/interfaces/rstan)
* [rstanarm](https://mc-stan.org/rstanarm/)
* [cmdstan](https://mc-stan.org/users/interfaces/cmdstan)
* [brms](https://paul-buerkner.github.io/brms/)
* [posterior](https://mc-stan.org/posterior/)
* [tidybayes](https://mjskay.github.io/tidybayes/)
* [bayesplot](https://mc-stan.org/bayesplot/)
* [posterior](https://mc-stan.org/posterior/)
* [rstantools](https://mc-stan.org/rstantools/)
* [projpred](https://mc-stan.org/projpred/)
* [shinystan](https://mc-stan.org/shinystan/)The [brms_within_chain_parallelization.R](brms_within_chain_parallelization.R) script can be executed within the Docker container to evaluate whether within-chain parallelization, CmdStan, brms, and OpenCL are working properly.
### Docker
This Docker image extends from `rocker/tidyverse`. [Click this link for more information about the Rocker project.](https://rocker-project.org/images/)
Running the Docker container will launch an RStudio web server. You can access RStudio by visiting localhost:$R_STUDIO_PORT on your web browser. See [.env](.env) for the defined environment variables.
Running docker-compose will bind a volume, mapping the container's `home` directory to a local `r_home` directory.
See the [Dockerfile](Dockerfile) for the instructions executed during the build of the Docker image.
View [docker-compose.yaml](docker-compose.yaml) to see the definition for the Stan service.