Skip to content

Commit

Permalink
Containerize missing tools/update (#289)
Browse files Browse the repository at this point in the history
* Containerize missing tools/update
Fixes #285
Fixes #286

* bump ubuntu package versions

* bioconductor date

* bumps

* change date 09.04 for posit packs

* date

* test

* ask=False
  • Loading branch information
espenhgn authored Dec 31, 2024
1 parent d9da66d commit 89ffdf4
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ If MD5 sum is not listed for a certain release then it means that the container

### Added

* Add R packages AER, MendelianRandomization, gwasurvivr
* Add R packages lightgbm, EFAtools, RiskScorescvd, glmnet, survival, caret, PooledCohort, genio, HyPrColoc
* Add Python3 packages miniwdl, miniwdl-slurm, dxpy
* Add unit test runs as part of the GitHub Actions workflow for building Docker containers
Expand Down
4 changes: 2 additions & 2 deletions docker/dockerfiles/r/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# R container
FROM rocker/verse:4.4.1
FROM ghcr.io/rocker-org/verse:4.4.1
# based on Ubuntu 22.04.5 LTS (jammy)

ENV TZ=Europe
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN bash /tmp/gcta/install_gcta.sh && \
# R packages.
# CRAN packages
WORKDIR /tmp/
RUN R -e "install.packages('devtools', repos='https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-01', dependencies=c('Depends', 'Imports', 'LinkingTo'))"
RUN R -e "install.packages('devtools', repos='https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-04', dependencies=c('Depends', 'Imports', 'LinkingTo'))"
COPY /scripts/R/cran.R .
RUN Rscript cran.R

Expand Down
10 changes: 6 additions & 4 deletions docker/scripts/R/bioconductor.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
dependencies <- c('Depends', 'Imports', 'LinkingTo')
upgrade <- 'default'

url = "https://packagemanager.posit.co/bioconductor/__linux__/jammy/2024-09-02"
url = "https://packagemanager.posit.co/bioconductor/__linux__/jammy/2024-09-04"
# Configure BioCManager to use Posit Package Manager:
options(BioC_mirror = "https://packagemanager.posit.co/bioconductor/2024-09-02")
options(BIOCONDUCTOR_CONFIG_FILE = "https://packagemanager.posit.co/bioconductor/2024-09-02/config.yaml")
options(BioC_mirror = "https://packagemanager.posit.co/bioconductor/2024-09-04")
options(BIOCONDUCTOR_CONFIG_FILE = "https://packagemanager.posit.co/bioconductor/2024-09-04/config.yaml")

# Configure a CRAN snapshot compatible with Bioconductor 3.19:
options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-01"))
options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-04"))

# Bioconductor packages
packages <- c(
Expand All @@ -29,6 +29,8 @@ packages <- c(

# install package from Bioconductor and quit with error if installation fails
library(devtools)
BiocManager::install(version='3.19', ask=FALSE)

for (package in packages) {
tryCatch(
{
Expand Down
4 changes: 3 additions & 1 deletion docker/scripts/R/cran.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
require(devtools)
url <- "https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-01"
url <- "https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-04"
dependencies <- c('Depends', 'Imports', 'LinkingTo')
upgrade <- 'default'

options(repos = c(CRAN = url))

# CRAN packages w. version
packages <- list(
'AER',
'argparser',
'arsenal',
'bigreadr',
Expand Down Expand Up @@ -54,6 +55,7 @@ packages <- list(
'lmerTest',
'magrittr',
'MatrixEQTL',
'MendelianRandomization',
'mgcv', # has gamm function
'miniCRAN',
'moments',
Expand Down
5 changes: 3 additions & 2 deletions docker/scripts/R/github.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url <- "https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-01"
url <- "https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-04"
dependencies <- c('Depends', 'Imports', 'LinkingTo')
upgrade <- 'default'
auth_token <- Sys.getenv("github_pat")
Expand Down Expand Up @@ -28,7 +28,8 @@ packages <- list(
'psychgen/phenotools' = '9eefa4ee0e8ea00bcbdb0e579dcdd7912cfe0597',
'wouterpeyrot/CCGWAS' = 'ce9764da946189623a0164f156ad119773bc32f5',
'WSpiller/MVMR' = '65705da9421b6235c7458dba6f01cddfebfe96f5',
'xiashen/MultiABEL' = '7067fe6753c74f6580029abc82bce914472b4b16'
'xiashen/MultiABEL' = '7067fe6753c74f6580029abc82bce914472b4b16',
'suchestoncampbelllab/gwasurvivr' = 'adad8509ad5f1f3033548bcb4d00f6f9c60778fa'
)

# install package from GitHub and quit with error if installation fails
Expand Down
6 changes: 3 additions & 3 deletions docker/scripts/apt_get_essential.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ apt-get update && apt-get install -y --no-install-recommends \
build-essential=12.8ubuntu1 \
bzip2=1.0.8-2 \
cmake=3.16.3-1ubuntu1.20.04.1 \
curl=7.68.0-1ubuntu2.24 \
curl=7.68.0-1ubuntu2.25 \
dos2unix=7.4.0-2 \
gdb=9.1-0ubuntu1 \
gfortran=4:9.3.0-1ubuntu2 \
git=1:2.25.1-1ubuntu3.13 \
less=551-1ubuntu0.3 \
libatlas-base-dev=3.10.3-8ubuntu7 \
libcurl4-openssl-dev=7.68.0-1ubuntu2.24 \
libcurl4-openssl-dev=7.68.0-1ubuntu2.25 \
libgomp1=10.5.0-1ubuntu1~20.04 \
libgsl-dev=2.5+dfsg-6+deb10u1build0.20.04.1 \
libnss3=2:3.98-0ubuntu0.20.04.2 \
Expand All @@ -35,7 +35,7 @@ apt-get update && apt-get install -y --no-install-recommends \
tar=1.30+dfsg-7ubuntu0.20.04.4 \
tofrodos=1.7.13+ds-4 \
unzip=6.0-25ubuntu1.1 \
vim=2:8.1.2269-1ubuntu5.25 \
vim=2:8.1.2269-1ubuntu5.29 \
wget=1.20.3-1ubuntu2.1 \
zlib1g-dev=1:1.2.11.dfsg-2ubuntu1.5

Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/install_bcftools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

# deps
apt-get update && apt-get install -y --no-install-recommends \
libcurl4-gnutls-dev=7.68.0-1ubuntu2.24 \
libcurl4-gnutls-dev=7.68.0-1ubuntu2.25 \
libperl-dev=5.30.0-9ubuntu0.5

apt-get clean && \
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/install_minimac4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
# install some deps for installing cget
apt-get update && \
apt-get install --no-install-recommends \
python3-pip=20.0.2-5ubuntu1.10 \
python3-pip=20.0.2-5ubuntu1.11 \
python3-click=7.0-3 \
python3-six=1.14.0-2 \
-y && \
Expand Down
3 changes: 3 additions & 0 deletions tests/extras/r.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ library(testthat)

# List of libraries to check
libraries_to_check <- c(
"AER",
"argparser",
"bigreadr",
"bigsnpr",
Expand Down Expand Up @@ -90,6 +91,7 @@ libraries_to_check <- c(
"gridExtra",
"gwasglue",
"gwasglue2",
"gwasurvivr",
"gwasvcf",
"haven",
"Haplin",
Expand All @@ -105,6 +107,7 @@ libraries_to_check <- c(
"lubridate",
"MASS",
"MatrixEQTL",
"MendelianRandomization",
"mgcv",
"miniCRAN",
"MRBEE",
Expand Down

0 comments on commit 89ffdf4

Please sign in to comment.