Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Meis committed Aug 12, 2020
1 parent 4152d5b commit 9ef95fc
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 2 deletions.
8 changes: 8 additions & 0 deletions oqbase.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM imbir:packages


COPY scripts /rocker_scripts

RUN /rocker_scripts/OQ_R.sh

CMD ["/init"]
8 changes: 8 additions & 0 deletions packages.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM imbir:Rstudio


COPY scripts /rocker_scripts

RUN /rocker_scripts/install_packages.sh

CMD ["/init"]
2 changes: 1 addition & 1 deletion scripts/OQ_R.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LC_COLLATE="C"
LC_TIME="C"

cd /R-${R_VERSION}
make check-all 2>&1 | tee /R-${R_VERSION}/logs/OQ.log
make check-all 2>&1 | tee /R-${R_VERSION}/logs/OQ_base.log



Expand Down
5 changes: 5 additions & 0 deletions scripts/copy_files_for_validation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e

sudo cp -r /R-4.0.2 /home/rstudio/
sudo cp -r /pkgs /home/rstudio/
6 changes: 6 additions & 0 deletions scripts/get_installed_packages.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# sink("/pkgs/installed_packages")

sink(paste0("/R-", paste(R.Version()$major, R.Version()$minor, sep = "."), "/logs/installed_packages.log"))
options(width=9999, max.print = 99999)
installed.packages()
sink()
8 changes: 8 additions & 0 deletions scripts/install_packages.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
install.packages(c("mice", "Exact", "MatchIt", "lmerTest", "survminer",
"netmeta", "meta", "pwr", "binom", "mvtnorm", "Matching", "pROC", "ROCR", "Hmisc",
"adoptr", "rpact", "rjags", "kable", "dfoptim", "optimx"),
destdir = "/pkgs/", repos = "https://cran.r-project.org/", type = "source")


devtools::install("/pkgs/DescrTab", dependencies=TRUE, repos="cran.r-project.org")
devtools::install("/pkgs/imbiReport", dependencies=TRUE, repos="cran.r-project.org")
13 changes: 12 additions & 1 deletion scripts/install_packages.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash
set -e

apt-get update && apt-get install jags

Rscript -e "install.packages('lme4', type='source', destdir='.')"
mkdir /pkgs
cd /pkgs/

git clone "https://[email protected]/imbi-heidelberg/imbiReport"
git clone "https://[email protected]/imbi-heidelberg/DescrTab"

Rscript /rocker_scripts/install_packages.R 2>&1 | tee /R-${R_VERSION}/logs/additional_packages_install.log


for f in *.tar.gz; do tar xf "$f"; done
Rscript /rocker_scripts/get_installed_packages.R
1 change: 1 addition & 0 deletions scripts/validation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rscript rocker_scripts/installed_packages.R
9 changes: 9 additions & 0 deletions validate.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM imbir:oqbase


COPY scripts /rocker_scripts

RUN Rscript -e 'devtools::install_github("https://github.com/pharmaR/riskmetric")'


CMD ["/init"]

0 comments on commit 9ef95fc

Please sign in to comment.