-
Couldn't load subscription status.
- Fork 74
Description
I have a project that should be deployed as a docker container, that means:
- I need an isolated library for development
- I need a way to fix package versions that I use during development
- Exactly these versions should install in the container, if possible from a plain lockfile, without recreating any isolated environment
- The package installation in the container should be fast.
I do not want to follow the R package structure, since I want to use box and nested modules.
renv is not exactly speedy, which is why I wanted to try pak. However, if I'm correct, pak does not setup a per-project library like renv does.
Using pak only in the container is not possible either, since it can't install from renv.lock.
I was wondering whether it's possible to use both together:
renv::init(bare=TRUE)to set up the project library- install
pak - add a package to
DESCRIPTION - do
pak::lockfile_create()to snapshot the package mentioned inDESCRIPTIONand their exact versions - copy that lockfile to the container, and to
pak::lockfile_install()in the container
What would be the recommended approach to have something similar to poetry, a file that describes the project dependencies, an isolated library, a lockfile, and as bare-bones as possible recreation in an isolated environment like docker?