Skip to content

Commit 44c41b6

Browse files
committed
Add Apptainer container definition for reproducible AnnotationGx environment
1 parent 9cf666e commit 44c41b6

3 files changed

Lines changed: 59 additions & 0 deletions

File tree

containers/apptainer/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# AnnotationGx Apptainer Container for DNAnexus
2+
3+
This container builds a reproducible environment for AnnotationGx.
4+
5+
## Why build an apptainer for ARPA deliverables?
6+
7+
Our current tools such as AnnotationGx and AnnotationDB may undergo:
8+
9+
- R version changes
10+
- Bioconductor releases
11+
- System libraries
12+
- Python / Node / API dependencies
13+
- Database drivers
14+
15+
Without an apptainer, we run the risk of reduced **reproducibility such as installation issues, missing libraries etc.**
16+
17+
For big projects like ARPA where running on HPC is warranted, Apptainers work best as HPC environments do not allow Docker and the need for security boundaries. This also ensures that easier onboarding of other groups who want to use our tools on DNAnexus.
18+
19+
## Build
20+
21+
From this directory:
22+
23+
bash build.sh
24+
25+
Or manually:
26+
27+
sudo apptainer build annotationgx.sif annotationgx.def
28+
29+
## Test
30+
31+
apptainer shell annotationgx.sif
32+
R
33+
library(AnnotationGx)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Bootstrap: docker
2+
From: rocker/r-ver:4.3.2
3+
4+
%post
5+
apt-get update && apt-get install -y \
6+
libcurl4-openssl-dev \
7+
libssl-dev \
8+
libxml2-dev \
9+
git
10+
11+
R -e "install.packages('BiocManager', repos='https://cloud.r-project.org')"
12+
R -e "BiocManager::install('AnnotationGx')"
13+
14+
%environment
15+
export LC_ALL=C
16+
17+
%labels
18+
Maintainer AnnotationGx Team
19+
Description "Apptainer container for AnnotationGx"

containers/apptainer/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
set -e
3+
4+
IMAGE_NAME="annotationgx.sif"
5+
DEF_FILE="annotationgx.def"
6+
7+
sudo apptainer build ${IMAGE_NAME} ${DEF_FILE}

0 commit comments

Comments
 (0)