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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -35
Dockerfile CHANGED
@@ -26,44 +26,34 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
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\
62
- site_dir /srv/shiny-server;\n\
63
- log_dir /var/log/shiny-server;\n\
64
- directory_index on;\n\
65
- }\n\
66
- }' > /etc/shiny-server/shiny-server.conf
67
 
68
  # ── Copy app ─────────────────────────────────────────────
69
  COPY app.R /srv/shiny-server/
 
26
  && apt-get clean \
27
  && rm -rf /var/lib/apt/lists/*
28
 
29
+ # ── Use Posit Package Manager for pre-built binaries ─────
30
+ # This skips source compilation entirely β€” no OOM risk
31
+ ENV RENV_CONFIG_REPOS_OVERRIDE="https://packagemanager.posit.co/cran/__linux__/jammy/latest"
32
 
33
+ RUN R -e "options( \
34
+ repos = c(CRAN = 'https://packagemanager.posit.co/cran/__linux__/jammy/latest'), \
35
+ pkgType = 'binary' \
36
+ ); \
37
+ install.packages(c( \
38
+ 'shiny', \
39
+ 'shinyWidgets', \
40
+ 'shinyjs', \
41
+ 'shinycssloaders', \
42
+ 'qtl', \
43
+ 'ggplot2', \
44
+ 'plotly', \
45
+ 'DT', \
46
+ 'dplyr', \
47
+ 'tidyr', \
48
+ 'viridis', \
49
+ 'circlize', \
50
+ 'scales', \
51
+ 'remotes' \
52
+ ), dependencies = TRUE)"
 
 
 
53
 
54
  # ── Configure Shiny Server for port 7860 ─────────────────
55
+ RUN echo 'run_as shiny;\nserver {\n listen 7860;\n location / {\n site_dir /srv/shiny-server;\n log_dir /var/log/shiny-server;\n directory_index on;\n }\n}' \
56
+ > /etc/shiny-server/shiny-server.conf
 
 
 
 
 
 
 
57
 
58
  # ── Copy app ─────────────────────────────────────────────
59
  COPY app.R /srv/shiny-server/