softwareDevelopment commited on
Commit
4694682
Β·
verified Β·
1 Parent(s): 08caf6e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -30
Dockerfile CHANGED
@@ -1,11 +1,11 @@
1
  # ============================================================
2
  # QTL Mapping Suite β€” Dockerfile for HuggingFace Spaces
3
  # ============================================================
4
- FROM rocker/shiny:4.3.2
5
  LABEL maintainer="QTL Mapping Suite"
6
  LABEL description="Interactive QTL Mapping Shiny Application"
7
 
8
- # ── System dependencies ──────────────────────────────────
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  libcurl4-openssl-dev \
11
  libssl-dev \
@@ -24,31 +24,34 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
  && apt-get clean \
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
- # ── Use Posit Package Manager for pre-built binaries ─────
28
- ENV RENV_CONFIG_REPOS_OVERRIDE="https://packagemanager.posit.co/cran/__linux__/jammy/latest"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
- RUN R -e "options( \
31
- repos = c(CRAN = 'https://packagemanager.posit.co/cran/__linux__/jammy/latest'), \
32
- pkgType = 'binary' \
33
- ); \
34
- install.packages(c( \
35
- 'shiny', \
36
- 'shinyWidgets', \
37
- 'shinyjs', \
38
- 'shinycssloaders', \
39
- 'qtl', \
40
- 'ggplot2', \
41
- 'plotly', \
42
- 'DT', \
43
- 'dplyr', \
44
- 'tidyr', \
45
- 'viridis', \
46
- 'circlize', \
47
- 'scales', \
48
- 'remotes' \
49
- ), dependencies = TRUE)"
50
 
51
- # ── Write Shiny Server config using heredoc (safe newlines) ──
52
  RUN printf '%s\n' \
53
  'run_as shiny;' \
54
  'server {' \
@@ -61,9 +64,6 @@ RUN printf '%s\n' \
61
  '}' \
62
  > /etc/shiny-server/shiny-server.conf
63
 
64
- # ── Verify the config was written correctly ───────────────
65
- RUN cat /etc/shiny-server/shiny-server.conf
66
-
67
  # ── Copy app ─────────────────────────────────────────────
68
  COPY app.R /srv/shiny-server/
69
 
@@ -74,6 +74,4 @@ RUN chown -R shiny:shiny /srv/shiny-server \
74
  && chown -R shiny:shiny /var/log/shiny-server
75
 
76
  EXPOSE 7860
77
-
78
- # ── Dump logs on crash for easier debugging ───────────────
79
  CMD ["/usr/bin/shiny-server"]
 
1
  # ============================================================
2
  # QTL Mapping Suite β€” Dockerfile for HuggingFace Spaces
3
  # ============================================================
4
+ FROM eddelbuettel/r2u:22.04
5
  LABEL maintainer="QTL Mapping Suite"
6
  LABEL description="Interactive QTL Mapping Shiny Application"
7
 
8
+ # ── System dependencies ───────────────────────────────────
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  libcurl4-openssl-dev \
11
  libssl-dev \
 
24
  && apt-get clean \
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
+ # ── Install R packages as true apt binaries via r2u ──────
28
+ # install.r is r2u's helper β€” resolves to apt binaries automatically
29
+ RUN install.r \
30
+ shiny \
31
+ shinyWidgets \
32
+ shinyjs \
33
+ shinycssloaders \
34
+ qtl \
35
+ ggplot2 \
36
+ plotly \
37
+ DT \
38
+ dplyr \
39
+ tidyr \
40
+ viridis \
41
+ circlize \
42
+ scales \
43
+ remotes \
44
+ && rm -rf /tmp/downloaded_packages
45
 
46
+ # ── Install Shiny Server ──────────────────────────────────
47
+ RUN wget -q https://download3.rstudio.org/ubuntu-18.04/x86_64/shiny-server-1.5.21.1012-amd64.deb \
48
+ && dpkg -i shiny-server-1.5.21.1012-amd64.deb \
49
+ && rm shiny-server-1.5.21.1012-amd64.deb \
50
+ && apt-get install -f -y \
51
+ && apt-get clean \
52
+ && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
+ # ── Write Shiny Server config ─────────────────────────────
55
  RUN printf '%s\n' \
56
  'run_as shiny;' \
57
  'server {' \
 
64
  '}' \
65
  > /etc/shiny-server/shiny-server.conf
66
 
 
 
 
67
  # ── Copy app ─────────────────────────────────────────────
68
  COPY app.R /srv/shiny-server/
69
 
 
74
  && chown -R shiny:shiny /var/log/shiny-server
75
 
76
  EXPOSE 7860
 
 
77
  CMD ["/usr/bin/shiny-server"]