File size: 2,608 Bytes
2697b73
bb68e88
2697b73
4694682
bb68e88
 
 
9215661
2697b73
af3a94d
 
218adfc
 
 
2697b73
 
 
 
 
 
 
bb68e88
 
2697b73
 
9588514
1d61b28
 
af3a94d
 
 
 
 
 
 
 
 
9215661
4694682
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d61b28
4694682
08caf6e
 
 
 
 
 
 
 
 
 
827fb46
1d61b28
c26515c
 
2965065
c26515c
 
08caf6e
 
 
c26515c
 
9215661
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
# ============================================================
#  QTL Mapping Suite β€” Dockerfile for HuggingFace Spaces
# ============================================================
FROM eddelbuettel/r2u:22.04
LABEL maintainer="QTL Mapping Suite"
LABEL description="Interactive QTL Mapping Shiny Application"

# ── System dependencies ───────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
    lsb-release \
    wget \
    libcurl4-openssl-dev \
    libssl-dev \
    libxml2-dev \
    libfontconfig1-dev \
    libharfbuzz-dev \
    libfribidi-dev \
    libfreetype6-dev \
    libpng-dev \
    libtiff5-dev \
    libjpeg-dev \
    libcairo2-dev \
    libxt-dev \
    libgit2-dev \
    pandoc \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# ── Install Shiny Server ──────────────────────────────────
RUN wget -q https://download3.rstudio.org/ubuntu-18.04/x86_64/shiny-server-1.5.21.1012-amd64.deb \
    && apt-get update \
    && apt-get install -f -y \
    && dpkg -i shiny-server-1.5.21.1012-amd64.deb \
    && rm shiny-server-1.5.21.1012-amd64.deb \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# ── Install R packages via r2u (pre-built binaries) ───────
RUN install.r \
    shiny \
    shinyWidgets \
    shinyjs \
    shinycssloaders \
    qtl \
    ggplot2 \
    plotly \
    DT \
    dplyr \
    tidyr \
    viridis \
    circlize \
    scales \
    remotes \
    && rm -rf /tmp/downloaded_packages

# ── Write Shiny Server config ─────────────────────────────
RUN printf '%s\n' \
    'run_as shiny;' \
    'server {' \
    '  listen 7860;' \
    '  location / {' \
    '    site_dir /srv/shiny-server;' \
    '    log_dir /var/log/shiny-server;' \
    '    directory_index on;' \
    '  }' \
    '}' \
    > /etc/shiny-server/shiny-server.conf

# ── Copy app ─────────────────────────────────────────────
COPY app.R /srv/shiny-server/

# ── Permissions ──────────────────────────────────────────
RUN chown -R shiny:shiny /srv/shiny-server \
    && chmod -R 755 /srv/shiny-server \
    && mkdir -p /var/log/shiny-server \
    && chown -R shiny:shiny /var/log/shiny-server

EXPOSE 7860
CMD ["/usr/bin/shiny-server"]