-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-base
67 lines (54 loc) · 1.93 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
## MODE Application: BASE IMAGE dockerfile
## Last Updated: 2022_08_31
## Use:
## export DOCKER_BUILDKIT=1
## docker build -f Dockerfile-base --no-cache -t code-registry.emsl.pnl.gov/multiomics-analyses/mode-app/base/<your version e.g. 1.0.0> .
## docker push code-registry.emsl.pnl.gov/multiomics-analyses/mode-app/base:<your version e.g. 1.0.0>
# Install latest version of rocker image
FROM rocker/shiny:4.2.1
# 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 \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
vim python3-venv
## restore from renv.lock ##
WORKDIR /srv/shiny-server/
# 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 these three to restore
COPY renv.lock .
# pre-install renv
RUN R -e "install.packages('renv', repos = 'https://cran.rstudio.com')"
# Run renv restore to download packages
RUN R -e 'options(renv.config.connect.timeout = 600)'
RUN R -e 'renv::restore()'
RUN R -e "devtools::install_github('hafen/trelliscopejs')"
## Setup Python venv ##
USER root
COPY requirements.txt .
RUN python3 -m venv /venv
RUN /venv/bin/pip install --upgrade pip
RUN /venv/bin/pip install -r requirements.txt
# Install rworker from source
RUN R -e "install.packages('remotes', repos = 'https://cran.rstudio.com')"
RUN R -e "remotes::install_github('https://github.com/lecardozo/rworker', repos = 'https://cran.rstudio.com', upgrade = 'always')"
# Install map data access package
COPY mapDataAccess /srv/shiny-server/mapDataAccess
RUN Rscript -e "remotes::install_local('/srv/shiny-server/mapDataAccess', repos = 'https://cran.rstudio.com')"