forked from pharmaverse/docker_pharmaverse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
104 lines (94 loc) · 3.22 KB
/
Copy pathDockerfile
File metadata and controls
104 lines (94 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Pharmaverse Docker Image
# Based on rocker/tidyverse with additional pharmaverse packages
#
# Rocker versioning: The tag corresponds to the R version
# Examples: 4.4.2, 4.4.1, 4.3.3, latest
# See: https://rocker-project.org/images/versioned/rstudio.html
FROM rocker/tidyverse:4.5.1
# Build arguments for dynamic labeling
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION=dev
# OCI-compliant labels with dynamic values
LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.authors="Pharmaverse Community"
LABEL org.opencontainers.image.url="https://pharmaverse.org"
LABEL org.opencontainers.image.documentation="https://github.com/pharmaverse/docker_pharmaverse#readme"
LABEL org.opencontainers.image.source="https://github.com/pharmaverse/docker_pharmaverse"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.revision="${VCS_REF}"
LABEL org.opencontainers.image.vendor="Pharmaverse"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.title="Pharmaverse Docker"
LABEL org.opencontainers.image.description="R environment with tidyverse and pharmaverse packages for clinical trials"
# Set R version for documentation
ENV R_VERSION=4.5.1
ENV CRAN=https://p3m.dev/cran/__linux__/noble/latest
# Set working directory
WORKDIR /home/rstudio
# Install pharmaverse packages using install2.r
# This script is included in the rocker image and handles system dependencies
RUN install2.r --error -n -2 \
admiral \
admiralmetabolic \
admiralneuro \
admiralonco \
admiralophtha \
admiralpeds \
admiralvaccine \
cards \
cardx \
chevron \
clinify \
connector \
covtracer \
datacutr \
datasetjson \
diffdf \
ggsurvfit \
gridify \
gtsummary \
logrx \
metacore \
metatools \
pharmaRTF \
pharmaverseadam \
pharmaverseraw \
pharmaversesdtm \
pkglite \
rhino \
riskmetric \
rlistings \
rtables \
sdtmchecks \
teal \
teal.modules.clinical \
teal.modules.general \
tern \
tfrmt \
tfrmtbuilder \
tidyCDISC \
tidytlg \
Tplyr \
whirl \
xportr
# Clean up
RUN rm -rf /var/lib/apt/lists/* /tmp/downloaded_packages
# Verify installation
RUN R -e "installed_packages <- installed.packages()[,1]; \
pharmaverse_packages <- c('admiral', 'admiralmetabolic', 'admiralneuro', 'admiralonco', \
'admiralophtha', 'admiralpeds', 'admiralvaccine', 'cards', 'cardx', 'chevron', \
'clinify', 'connector', 'covtracer', 'datacutr', 'datasetjson', 'diffdf', \
'ggsurvfit', 'gridify', 'gtsummary', 'logrx', 'metacore', 'metatools', \
'pharmaRTF', 'pharmaverseadam', 'pharmaverseraw', 'pharmaversesdtm', 'pkglite', \
'rhino', 'riskmetric', 'rlistings', 'rtables', 'sdtmchecks', 'teal', 'teal.modules.clinical', 'teal.modules.general', 'tern', \
'tfrmt', 'tfrmtbuilder', 'tidyCDISC', 'tidytlg', 'Tplyr', 'whirl', 'xportr'); \
missing <- setdiff(pharmaverse_packages, installed_packages); \
if(length(missing) > 0) { \
cat('Missing packages:', paste(missing, collapse=', '), '\n'); \
quit(status=1); \
} else { \
cat('All pharmaverse packages installed successfully!\n'); \
}"
# Set default command
CMD ["/init"]