Skip to content
Snippets Groups Projects
Commit 1ecf3661 authored by Dominik Brilhaus's avatar Dominik Brilhaus
Browse files

restructure renv

parent 6d067007
No related branches found
No related tags found
No related merge requests found
Pipeline #2452 passed
source("renv/activate.R")
This diff is collapsed.
library/
local/
cellar/
lock/
python/
sandbox/
staging/
This diff is collapsed.
{
"bioconductor.version": null,
"external.libraries": [],
"ignored.packages": [],
"package.dependency.fields": [
"Imports",
"Depends",
"LinkingTo"
],
"ppm.enabled": null,
"ppm.ignored.urls": [],
"r.version": null,
"snapshot.type": "implicit",
"use.cache": true,
"vcs.ignore.cellar": true,
"vcs.ignore.library": true,
"vcs.ignore.local": true,
"vcs.manage.ignores": true
}
## Use pre-built base image coming with R and required system libraries
FROM rstudio/r-base:4.3-jammy
## Install package `renv` to Docker image
RUN R -e "install.packages('renv', repos = c(CRAN = 'https://cloud.r-project.org'))"
## pull in a manifest file and restore it
COPY renv.lock ./
RUN R -e 'renv::restore()'
\ No newline at end of file
## Build docker image
docker build --pull --rm -f "workflows/_R-docker/Dockerfile" -t rdocker-test:latest "workflows/_R-docker"
---
title: "Using renv and docker"
author: "Dominik Brilhaus"
date: 2024-08-05
output: html_document
---
```{r}
install.packages("renv")
renv::init(bare = TRUE)
renv::status()
renv::dependencies()
renv::snapshot()
```
```{r}
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.19")
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment