-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-base
53 lines (44 loc) · 1.79 KB
/
Dockerfile-base
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
## pmartR-shiny 'base' container. Installs system and R libraries.
# Install latest version of rocker image
FROM docker.io/rocker/shiny:4.2.3@sha256:420073894c8bdde15e684e0ece65cceac2a7cc51cc301ee5bd88824ee5d06785
# Load general use libraries
RUN apt-get update && apt-get install -y \
sudo \
pandoc \
pandoc-citeproc \
libssl-dev \
libcurl4-openssl-dev \
libcairo2-dev \
libxt-dev \
libssh2-1-dev \
libhiredis-dev \
libzmq3-dev \
libxml2-dev \
libcurl3-gnutls \
vim python3-venv \
automake
USER root
WORKDIR /srv/shiny-server/
# pre-install renv
ENV RENV_VERSION 1.0.3
RUN R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))"
RUN R -e "options('repos'=c(CRAN = 'https://cloud.r-project.org'));remotes::install_version('renv', version = '${RENV_VERSION}')"
# Need to set linker flags to install pmartR in linux environment
RUN mkdir $HOME/.R
COPY Makevars-docker .
RUN cp Makevars-docker $HOME/.R/Makevars
# only need this to restore
COPY renv.lock .
# install all packages listed in renv.lock
RUN --mount=type=secret,id=gitlab_pat export GITLAB_PAT="$(cat /run/secrets/gitlab_pat)" \
&& R -e 'renv::restore()'
# install commonly updated packages
RUN --mount=type=secret,id=access_tokens set -a \
&& . /run/secrets/access_tokens && set +a \
&& R -e "renv::install('[email protected]::multiomics-analyses/mapdataaccess-lib@7225058a1563944d2f20b10655cb2b92ae23ed71')" \
&& R -e "install.packages('BiocManager');options(repos=c('CRAN' = 'https://cloud.r-project.org', BiocManager::repositories()));remotes::install_version('pmartR', version='2.4.5', dependencies=TRUE);"
# Install python dependencies
COPY requirements.txt .
RUN python3 -m venv /venv
RUN /venv/bin/pip install --upgrade pip
RUN /venv/bin/pip install -r requirements.txt