-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
54 lines (48 loc) · 1.71 KB
/
Dockerfile
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
# Install rocker
FROM rocker/shiny:4.1.3
# Install Ubuntu packages
RUN apt-get update && apt-get install -y \
build-essential \
zlib1g-dev \
libncurses5-dev \
libgdbm-dev \
libnss3-dev \
libssl-dev \
libreadline-dev \
libffi-dev \
wget \
#python3-pip \
#python3-dev \
liblzma-dev \
libbz2-dev \
libicu-dev \
openjdk-8-jdk \
git
# Install R packages that are required
WORKDIR /opt
RUN wget https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tgz
RUN tar -xf Python-3.11.5.tgz
WORKDIR Python-3.11.5
RUN ./configure --enable-optimizations --enable-shared
RUN sudo make altinstall
RUN mkdir /home/shiny/GitHub
RUN sudo ldconfig /usr/local/lib
RUN pip3.11 install pip setuptools wheel --upgrade
RUN pip3.11 install pycrossva
RUN R CMD javareconf
RUN R -e "install.packages(c('glue', 'shinyjs', 'openVA'), repos='http://cran.rstudio.com/')"
RUN git -C /home/shiny/GitHub/ clone https://github.com/verbal-autopsy-software/openVA_App
RUN R CMD INSTALL /home/shiny/GitHub/openVA_App/pkg
# Set up SmartVA-Analyze
RUN wget -P /opt/SmartVA https://github.com/ihmeuw/SmartVA-Analyze/releases/download/v2.1.0/smartva
RUN chmod 755 /opt/SmartVA/smartva
ENV PATH="/opt/SmartVA:${PATH}"
# Set up app
RUN mkdir /srv/shiny-server/openVA_App
RUN echo "appDir <- system.file('app', package = 'openVAapp'); options(shiny.maxRequestSize = 100*1024^2); library(openVAapp); shinyAppDir(appDir)" > /srv/shiny-server/openVA_App/app.R
RUN chown -R shiny:shiny /srv/shiny-server
RUN chown -R shiny:shiny /usr/local/lib/R/site-library/openVAapp
# Start container with:
# docker run --rm --user shiny -p 3838:3838 -v /srv/shinylog/:/var/log/shiny-server/ openVA_App
# Open app at:
# localhost:3838/openVA_App