https://github.com/anthesevenants/r-in-docker
A script to spin up an R project that runs in Docker
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.6%) to scientific vocabulary
Repository
A script to spin up an R project that runs in Docker
Basic Info
- Host: GitHub
- Owner: AntheSevenants
- License: mit
- Language: Shell
- Default Branch: main
- Size: 3.91 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
r-in-docker
A script to spin up an R (Studio) project that runs in Docker
Since I've had to change computers at work more often than I'd like (looking at you, HP), I built a workflow around running R and its packages within a Docker container. The benefit of this is that my environments are fully reproducible, and can be spun up within minutes, including dependencies.
The downside is that it takes a bit of prep work to get to this point. This repository automates that work in a single script.
Assumptions
- UNIX-like operating system (real or virtualised)
- Docker is installed
- Current user is in the
dockergroup
How to use
Setup
git clone https://github.com/AntheSevenants/r-in-docker.gitcd r-in-dockerchmod +x r-in-docker.shsudo cp r-in-docker.sh /usr/local/bin/r-in-docker.sh
Use
- Navigate to the directory where you want the project folder to be created.
- Run
r-in-docker.sh. If you supply an argument, that argument will be used as the project name. Else, the script will ask for the project name. - The project directory and files will be created automatically. All that remains to do is to run
docker compose upin the project directory.
Notice
- You will have to rebuild your images if you add dependencies. You can do this by running
sh .docker/build.shfrom within the project directory. Make sure to snapshot your dependencies withrenv:snapshot()from within R. This will update the lockfile (renv.lock) - Docker images will be generated with the 'anthesevenants/' prefix and my git credentials. That's me, after all. If you want to change this, feel free to fork this repository.
Owner
- Name: Anthe Sevenants
- Login: AntheSevenants
- Kind: user
- Location: Leuven, Belgium
- Company: KU Leuven
- Website: anthe.sevenants.net
- Repositories: 39
- Profile: https://github.com/AntheSevenants
AI & linguistics master. Linguistics PhD candidate @QLVL
GitHub Events
Total
- Push event: 2
- Create event: 2
Last Year
- Push event: 2
- Create event: 2