softwareDevelopment commited on
Commit
c26515c
Β·
verified Β·
1 Parent(s): bb68e88

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -30
Dockerfile CHANGED
@@ -3,9 +3,7 @@
3
  # Base: rocker/shiny (R + Shiny Server)
4
  # Listens on port 7860 (HuggingFace default)
5
  # ============================================================
6
-
7
  FROM rocker/shiny:4.3.2
8
-
9
  LABEL maintainer="QTL Mapping Suite"
10
  LABEL description="Interactive QTL Mapping Shiny Application"
11
 
@@ -28,37 +26,36 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
28
  && apt-get clean \
29
  && rm -rf /var/lib/apt/lists/*
30
 
31
- # ── Install R packages ───────────────────────────────────
32
- RUN R -e "install.packages(c( \
33
- 'shiny', \
34
- 'shinyWidgets', \
35
- 'shinyjs', \
36
- 'shinycssloaders', \
37
- 'qtl', \
38
- 'ggplot2', \
39
- 'plotly', \
40
- 'DT', \
41
- 'dplyr', \
42
- 'tidyr', \
43
- 'viridis', \
44
- 'circlize', \
45
- 'scales', \
46
- 'remotes' \
47
- ), repos='https://cloud.r-project.org', dependencies=TRUE)"
48
 
49
- # ── Configure Shiny Server for port 7860 ─────────────────
50
- RUN sed -i 's/listen 3838/listen 7860/' /etc/shiny-server/shiny-server.conf
 
51
 
52
- # ── Copy app ─────────────────────────────────────────────
53
- COPY app.R /srv/shiny-server/
 
54
 
55
- # ── Permissions ──────────────────────────────────────────
56
- RUN chown -R shiny:shiny /srv/shiny-server \
57
- && chmod -R 755 /srv/shiny-server
 
 
 
 
 
 
 
 
 
58
 
59
- # ── Shiny Server config (override default) ───────────────
60
- RUN echo ' \
61
- run_as shiny;\n\
 
 
62
  server {\n\
63
  listen 7860;\n\
64
  location / {\n\
@@ -68,6 +65,12 @@ server {\n\
68
  }\n\
69
  }' > /etc/shiny-server/shiny-server.conf
70
 
71
- EXPOSE 7860
 
72
 
 
 
 
 
 
73
  CMD ["/usr/bin/shiny-server"]
 
3
  # Base: rocker/shiny (R + Shiny Server)
4
  # Listens on port 7860 (HuggingFace default)
5
  # ============================================================
 
6
  FROM rocker/shiny:4.3.2
 
7
  LABEL maintainer="QTL Mapping Suite"
8
  LABEL description="Interactive QTL Mapping Shiny Application"
9
 
 
26
  && apt-get clean \
27
  && rm -rf /var/lib/apt/lists/*
28
 
29
+ # ── Batch 1: Core Shiny packages (lightweight) ───────────
30
+ RUN R -e "install.packages(c('shiny','shinyjs','shinycssloaders','shinyWidgets'), \
31
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
+ # ── Batch 2: Data packages ───────────────────────────────
34
+ RUN R -e "install.packages(c('dplyr','tidyr','scales','remotes'), \
35
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
36
 
37
+ # ── Batch 3: QTL (can be large) ─────────────────────────
38
+ RUN R -e "install.packages('qtl', \
39
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
40
 
41
+ # ── Batch 4: Plotting (heaviest β€” split individually) ────
42
+ RUN R -e "install.packages('ggplot2', \
43
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
44
+
45
+ RUN R -e "install.packages('plotly', \
46
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
47
+
48
+ RUN R -e "install.packages('DT', \
49
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
50
+
51
+ RUN R -e "install.packages('viridis', \
52
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
53
 
54
+ RUN R -e "install.packages('circlize', \
55
+ repos='https://cloud.r-project.org', dependencies=TRUE, Ncpus=1)"
56
+
57
+ # ── Configure Shiny Server for port 7860 ─────────────────
58
+ RUN echo 'run_as shiny;\n\
59
  server {\n\
60
  listen 7860;\n\
61
  location / {\n\
 
65
  }\n\
66
  }' > /etc/shiny-server/shiny-server.conf
67
 
68
+ # ── Copy app ─────────────────────────────────────────────
69
+ COPY app.R /srv/shiny-server/
70
 
71
+ # ── Permissions ──────────────────────────────────────────
72
+ RUN chown -R shiny:shiny /srv/shiny-server \
73
+ && chmod -R 755 /srv/shiny-server
74
+
75
+ EXPOSE 7860
76
  CMD ["/usr/bin/shiny-server"]