-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpkg_build.R
32 lines (23 loc) · 838 Bytes
/
pkg_build.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# cleanup
rm(list=ls()); gc(); cat("\014"); try(dev.off(), silent=T);
# working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
# package documentation
devtools::document()
# dockerfile
# see https://rocker-project.org/images/ for other Rocker images
golem::add_dockerfile_shinyproxy(
paste0("rocker/rstudio:", R.Version()$major, ".", R.Version()$minor))
# in Terminal
# 1. place yourself in the folder where your docker file is created
# 2. check that you have docker installed: docker --version
# 3. create the image: docker build -t lemurapp:v3 .
# 4. after 15min when all is ready: docker image ls
# 5. test image locally: docker run lemurapp:v3
# restart R
rstudioapi::restartSession()
# install from source
install.packages(getwd(), repo=NULL, type='source')
# run app
library(lemur)
lemur::run_app()