-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from kaybenleroll/create-simple-hier-models
create simple hier models
- Loading branch information
Showing
54 changed files
with
80,689 additions
and
6,379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,16 @@ | |
|
||
*.qmd | ||
*.html | ||
*.log | ||
*.R | ||
|
||
data/* | ||
precompute/* | ||
.git/* | ||
|
||
stan_code/* | ||
stan_models/* | ||
img/* | ||
|
||
*_cache/* | ||
*_files/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
.Rhistory | ||
.RData | ||
|
||
.Rproj.user/ | ||
|
||
temp.R | ||
.vscode/ | ||
|
||
*_cache/* | ||
*_files/* | ||
|
||
output.log | ||
|
||
*.rmarkdown | ||
*.dot | ||
|
||
.Rhistory | ||
.RData | ||
|
||
*.log | ||
|
||
temp*.R | ||
|
||
precompute_*.bz2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
FROM rocker/tidyverse:4.2.3 | ||
FROM rocker/tidyverse:4.3.1 | ||
|
||
COPY build/Rprofile.site /usr/local/lib/R/etc/ | ||
COPY build/Renviron.site /usr/local/lib/R/etc/ | ||
|
||
ENV TZ=Europe/Dublin | ||
|
||
|
@@ -17,23 +20,38 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ | |
libglpk-dev \ | ||
libgsl-dev \ | ||
libnlopt-dev \ | ||
libomp-dev \ | ||
p7zip-full \ | ||
pbzip2 \ | ||
rsyslog \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p $HOME/.R \ | ||
&& echo "" > $HOME/.R/Makevars \ | ||
&& echo "CC=clang" >> $HOME/.R/Makevars \ | ||
&& echo "CXX=clang++" >> $HOME/.R/Makevars \ | ||
&& echo "CXXFLAGS=-Os" >> $HOME/.R/Makevars \ | ||
&& echo "CXXFLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \ | ||
&& echo "CXXFLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \ | ||
&& echo "" >> $HOME/.R/Makevars \ | ||
&& echo "CC11=clang" >> $HOME/.R/Makevars \ | ||
&& echo "CXX11=clang++" >> $HOME/.R/Makevars \ | ||
&& echo "CXX11FLAGS=-Os" >> $HOME/.R/Makevars \ | ||
&& echo "CXX11FLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \ | ||
&& echo "CXX11FLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \ | ||
&& echo "" >> $HOME/.R/Makevars \ | ||
&& echo "CC14=clang" >> $HOME/.R/Makevars \ | ||
&& echo "CXX14=clang++" >> $HOME/.R/Makevars \ | ||
&& echo "CXX14FLAGS=-Os" >> $HOME/.R/Makevars \ | ||
&& echo "CXX14FLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \ | ||
&& echo "CXX14FLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \ | ||
&& echo "" >> $HOME/.R/Makevars \ | ||
&& echo "CC17=clang++" >> $HOME/.R/Makevars \ | ||
&& echo "CXX17=clang++" >> $HOME/.R/Makevars \ | ||
&& echo "CXX17FLAGS=-Os" >> $HOME/.R/Makevars \ | ||
&& echo "CXX17FLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \ | ||
&& echo "CXX17FLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \ | ||
&& echo "" >> $HOME/.R/Makevars \ | ||
&& install2.r --error \ | ||
anytime \ | ||
bayesplot \ | ||
|
@@ -50,6 +68,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ | |
fs \ | ||
furrr \ | ||
loo \ | ||
markdown \ | ||
modeltime \ | ||
posterior \ | ||
projpred \ | ||
|
@@ -70,8 +89,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ | |
timetk | ||
|
||
|
||
COPY build/logging.conf /etc/rstudio/ | ||
|
||
WORKDIR /tmp | ||
|
||
COPY build/docker_install_sys_rpkgs.R /tmp | ||
|
@@ -107,5 +124,14 @@ RUN Rscript /tmp/docker_install_user_rpkgs.R | |
USER root | ||
|
||
RUN chown -R rstudio:rstudio /home/rstudio \ | ||
&& chmod ugo+rx /home/rstudio | ||
&& chmod ugo+rx /home/rstudio \ | ||
&& chown -R rstudio:rstudio /home/rstudio/.cmdstan | ||
|
||
|
||
ARG BUILD_DATE | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/kaybenleroll/btydbayes_investigation" \ | ||
org.opencontainers.image.authors="Mick Cooney <[email protected]>" \ | ||
org.label-schema.build-date=$BUILD_DATE | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,5 @@ AutoAppendNewline: Yes | |
StripTrailingWhitespace: Yes | ||
|
||
BuildType: Makefile | ||
|
||
MarkdownReferences: Document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
R_LIBS=${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library'} | ||
CRAN=https://packagemanager.posit.co/cran/2023-10-06 | ||
CWD=/home/rstudio | ||
DEFAULT_USER=rstudio | ||
GROUPID=1000 | ||
HOSTNAME=2a08c571a82c | ||
LANG=en_US.UTF-8 | ||
PANDOC_VERSION=default | ||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
QUARTO_VERSION=default | ||
R_HOME=/usr/local/lib/R | ||
R_VERSION=4.3.1 | ||
S6_VERSION=v2.1.0.2 | ||
USER=rstudio | ||
USERID=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
options(repos = c(CRAN = 'https://packagemanager.posit.co/cran/2023-10-06'), download.file.method = 'libcurl') | ||
# https://docs.rstudio.com/rspm/admin/serving-binaries/#binaries-r-configuration-linux | ||
options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM busybox | ||
|
||
RUN mkdir /tmp/build/ | ||
# Add context to /tmp/build/ | ||
COPY . /tmp/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
calculate_object_size <- function(x) { | ||
message(glue("Calculating size for object {x}")) | ||
|
||
size <- x |> | ||
get() |> | ||
obj_size() | ||
|
||
return(size) | ||
} | ||
|
||
|
||
var_sizes_tbl <- ls() |> | ||
enframe(name = NULL, value = "object_name") |> | ||
mutate( | ||
object_size = map_dbl( | ||
object_name, calculate_object_size, | ||
.progress = FALSE | ||
), | ||
object_size_mb = object_size / (1024 * 1024) | ||
) | ||
|
||
var_sizes_tbl |> glimpse() |
Oops, something went wrong.