Complicated Bayesian models take forever to run, though, because of long Monte Carlo Markov chains (it takes hours to run dozens of Bayesian random effects effects models with rstanarm::stan_glmer(), for instance). Offloading computationally intensive stuff: I often build Bayesian models with Stan and rstanarm. In an ideal world, you can create a Dockerfile for a specific project, develop everything in RStudio in the browser, and the distribute both the Dockerfile and the project repository so others can reproduce everything. (Or, be lazy like me and keep developing in your local R installation without containers and periodically check to make sure it all works in a pristine development environment in a container).Īll someone needs to do to run your project is pull the Docker image for your project, which will already have all the packages and dependencies and extra files installed. (This idea comes from a Twitter conversation with ( noamross?).) Create a custom Dockerfile for your project where you install any additional packages your project needs ( more on that below), and then develop your project in the browser-based RStudio from the container. Instead of using packrat, you can develop an R project within a Docker container. R has packrat, which is incorporated into RStudio, but it’s a hassle and I hate using it and can never get it working right. Reproducibility and consistent development environments: Python virtual environments are awesome-anyone can install all the packages/libraries your script needs in a local Python installation. I’ve found two general reasons for running R in a Docker container:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |