Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions molgenis-rock-possum/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Rock R Server Dockerfile with DataSHIELD Armadillo molgenis profile
#
# https://github.com/datashield/docker-rock
#

# R 4.6.1, Rock 2.2.1
FROM datashield/rock-base:6.3.5-R4.6.1

ENV DSMEDIATION_VERSION=0.0.3
ENV DSEXPOSOME_VERSION=2.0.9
ENV DSTIDYVERSE_VERSION=v1.2.2
ENV DSOMICS_VERSION=v1.0.19
ENV DSMTL_VERSION=0.9.9
ENV DSSURVIVAL_VERSION=v2.1.3
ENV DSBASE_VERSION=6.3.5

ENV ROCK_LIB=/var/lib/rock/R/library

# Specify Labels
LABEL dsMediation=${DSMEDIATION_VERSION}
LABEL dsMTL=${DSMTL_VERSION}
LABEL dsMSurvival=${DSSURVIVAL_VERSION}
LABEL dsTidyverse=${DSTIDYVERSE_VERSION}
LABEL dsExposome=${DSEXPOSOME_VERSION}
LABEL dsOmics=${DSOMICS_VERSION}
LABEL dsBase=${DSBASE_VERSION}
RUN --mount=type=cache,target=/root/.cache/R \
--mount=type=cache,target=/tmp/downloaded_packages
# Install new R packages
RUN Rscript -e "remotes::install_github('datashield/dsMediation', ref = '$DSMEDIATION_VERSION', repos = c('https://cloud.r-project.org', 'https://cran.datashield.org'), upgrade = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "remotes::install_github('transbioZI/dsMTLBase', ref = '$DSMTL_VERSION', dependencies = TRUE, upgrade = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "remotes::install_github('datashield/dsSurvival', ref = '$DSSURVIVAL_VERSION', dependencies = TRUE, upgrade = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "remotes::install_github('molgenis/ds-tidyverse', ref = '$DSTIDYVERSE_VERSION', dependencies = TRUE, upgrade = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "BiocManager::install(c('bumphunter', 'missMethyl', 'rexposome'), update = FALSE, ask = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "remotes::install_github('isglobal-brge/dsExposome', ref = '$DSEXPOSOME_VERSION', repos = c('https://cloud.r-project.org', 'https://cran.datashield.org'), upgrade = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "BiocManager::install(c('Biobase', 'SNPRelate', 'GENESIS', 'GWASTools', 'GenomicRanges', 'SummarizedExperiment', 'DESeq2', 'edgeR', 'MEAL'), update = FALSE, ask = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "remotes::install_github('isglobal-brge/dsOmics', ref = '$DSOMICS_VERSION', upgrade = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "remotes::install_github('datashield/dsBase', ref = '$DSBASE_VERSION', dependencies = TRUE, upgrade = FALSE, lib = '$ROCK_LIB')" \
&& chown -R rock $ROCK_LIB
32 changes: 32 additions & 0 deletions molgenis-rock-possum/Dockerfile.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Rock R Server Dockerfile with DataSHIELD Tulip Donkey profile
#

FROM datashield/molgenis-rock-base:4.1.0

ENV DSMEDIATION_VERSION=0.0.3
ENV DSEXPOSOME_VERSION=2.0.9
ENV DSTIDYVERSE_VERSION=v1.2.2
ENV DSOMICS_VERSION=v1.0.19
ENV DSMTL_VERSION=0.9.9
ENV DSSURVIVAL_VERSION=v2.1.3
ENV DSBASE_VERSION=6.3.5

ENV ROCK_LIB=/var/lib/rock/R/library

LABEL dsMediation=${DSMEDIATION_VERSION}
LABEL dsMTL=${DSMTL_VERSION}
LABEL dsMSurvival=${DSSURVIVAL_VERSION}
LABEL dsTidyverse=${DSTIDYVERSE_VERSION}
LABEL dsExposome=${DSEXPOSOME_VERSION}
LABEL dsOmics=${DSOMICS_VERSION}
LABEL dsBase=${DSBASE_VERSION}
RUN rm -f /etc/apt/sources.list.d/*arrow* || true
RUN rm -f /etc/apt/sources.list.d/*apache* || true
RUN apt-get update
COPY install.R /tmp/install.R

RUN --mount=type=cache,target=/root/.cache/R \
--mount=type=cache,target=/tmp/downloaded_packages \
Rscript /tmp/install.R \
&& chown -R rock ${ROCK_LIB}
674 changes: 674 additions & 0 deletions molgenis-rock-possum/LICENSE

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions molgenis-rock-possum/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# Docker helper
#
export DOCKER_BUILDKIT=1

docker_compose_file=docker-compose.yml
no_cache=true
name=datashield/molgenis-rock-possum
tag=1.0.0

# Build Docker image
build-image:
docker build --no-cache=$(no_cache) -t="${name}:$(tag)" .

push-image:
docker image push ${name}:$(tag)

up:
docker compose -f $(docker_compose_file) up -d --remove-orphans

down:
docker compose -f $(docker_compose_file) down

stop:
docker compose -f $(docker_compose_file) stop

start:
docker compose -f $(docker_compose_file) start

restart:
docker compose -f $(docker_compose_file) restart

pull:
docker compose -f $(docker_compose_file) pull --include-deps

logs:
docker compose -f $(docker_compose_file) logs -f

build:
docker compose -f $(docker_compose_file) build --no-cache

clean:
rm -rf target
3 changes: 3 additions & 0 deletions molgenis-rock-possum/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# docker-rock-tulip-donkey

[Rock R server](https://www.obiba.org/pages/products/rock/) with DataSHIELD packages as described by [tulip-donkey](https://datashield.org/help/standard-profiles-and-plaforms).
22 changes: 22 additions & 0 deletions molgenis-rock-possum/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
rock-tulip-donkey:
image: datashield/molgenis-rock-possum:1.0.0
#build: .
ports:
- ${PORT}:8085
environment:
- ROCK_ADMINISTRATOR_NAME=${ROCK_ADMINISTRATOR_NAME}
- ROCK_ADMINISTRATOR_PASSWORD=${ROCK_ADMINISTRATOR_PASSWORD}
- ROCK_MANAGER_NAME=${ROCK_MANAGER_NAME}
- ROCK_MANAGER_PASSWORD=${ROCK_MANAGER_PASSWORD}
- ROCK_USER_NAME=${ROCK_USER_NAME}
- ROCK_USER_PASSWORD=${ROCK_USER_PASSWORD}
- ROCK_ID=${ROCK_ID}
- ROCK_CLUSTER=${ROCK_CLUSTER}
- ROCK_TAGS=${ROCK_TAGS}
# for self-registration
#- ROCK_SERVER=${ROCK_SERVER}
#- ROCK_OPAL_SERVER=${ROCK_OPAL_SERVER}
#- ROCK_OPAL_TOKEN=${ROCK_OPAL_TOKEN}
volumes:
- ${PROJECT_HOME}/rock_home:/srv
76 changes: 76 additions & 0 deletions molgenis-rock-possum/install.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
rock_lib <- Sys.getenv("ROCK_LIB")

repos <- c(
CRAN = "https://cloud.r-project.org",
DataShield = "https://cran.datashield.org"
)

options(repos = repos)
Sys.setenv(PAK_SYSREQS = "false")

# pak installeren indien nog niet aanwezig
if (!requireNamespace("pak", quietly = TRUE)) {
install.packages(
"pak",
repos = "https://cloud.r-project.org",
lib = rock_lib
)
}

.libPaths(c(rock_lib, .libPaths()))

# GitHub packages
pak::pkg_install(
c(
sprintf(
"github::datashield/dsMediation@%s",
Sys.getenv("DSMEDIATION_VERSION")
),
sprintf(
"github::transbioZI/dsMTLBase@%s",
Sys.getenv("DSMTL_VERSION")
),
sprintf(
"github::datashield/dsSurvival@%s",
Sys.getenv("DSSURVIVAL_VERSION")
),
sprintf(
"github::molgenis/ds-tidyverse@%s",
Sys.getenv("DSTIDYVERSE_VERSION")
),
sprintf(
"github::isglobal-brge/dsExposome@%s",
Sys.getenv("DSEXPOSOME_VERSION")
),
sprintf(
"github::isglobal-brge/dsOmics@%s",
Sys.getenv("DSOMICS_VERSION")
),
sprintf(
"github::datashield/dsBase@%s",
Sys.getenv("DSBASE_VERSION")
)
),
lib = rock_lib
)

# Bioconductor packages in één call
BiocManager::install(
c(
"bumphunter",
"missMethyl",
"rexposome",
"Biobase",
"SNPRelate",
"GENESIS",
"GWASTools",
"GenomicRanges",
"SummarizedExperiment",
"DESeq2",
"edgeR",
"MEAL"
),
update = FALSE,
ask = FALSE,
lib = rock_lib
)