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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +47 -38
Dockerfile CHANGED
@@ -1,9 +1,15 @@
1
  # ============================================================
2
- # QTL Mapper Pro β€” Dockerfile for Hugging Face Spaces
 
 
3
  # ============================================================
4
- FROM rocker/shiny:4.3.3
5
 
6
- # ── System dependencies ──────────────────────────────────────
 
 
 
 
 
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  libcurl4-openssl-dev \
9
  libssl-dev \
@@ -15,50 +21,53 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
15
  libpng-dev \
16
  libtiff5-dev \
17
  libjpeg-dev \
 
 
18
  libgit2-dev \
19
- libv8-dev \
20
  pandoc \
21
- libglpk-dev \
22
- libglpk40 \
23
- libnlopt-dev \
24
- libicu-dev \
25
- zlib1g-dev \
26
- libbz2-dev \
27
- liblzma-dev \
28
  && apt-get clean \
29
  && rm -rf /var/lib/apt/lists/*
30
 
31
- # ── R packages ───────────────────────────────────────────────
32
- RUN install2.r --error \
33
- htmltools htmlwidgets jsonlite crosstalk magrittr promises
34
-
35
- RUN install2.r --error \
36
- nloptr lme4 emmeans readxl plotly \
37
- shinyjs shinyWidgets shinycssloaders \
38
- DT RColorBrewer ggrepel openxlsx
39
-
40
- RUN install2.r --error tidyverse igraph
41
-
42
- RUN install2.r --error \
43
- data.table shiny qtl ggplot2 dplyr tidyr viridis reshape2 scales
44
-
45
- # ── Bioconductor ─────────────────────────────────────────────
46
- RUN R -e "install.packages('BiocManager', repos='https://cloud.r-project.org/')"
47
-
48
- RUN R -e "BiocManager::install(c('GenomicRanges','IRanges','S4Vectors','Biostrings','Rsamtools','GenomeInfoDb'), ask=FALSE, update=FALSE)"
49
-
50
- RUN install2.r --error vcfR
51
 
52
- # ── GitHub packages ──────────────────────────────────────────
53
- RUN install2.r --error remotes
54
 
55
- RUN R -e "remotes::install_github('bmansfeld/QTLseqr', upgrade='never', dependencies=FALSE)"
 
56
 
57
- # ── App setup ────────────────────────────────────────────────
58
- RUN mkdir -p /code/www && echo "OK" > /code/www/health
 
59
 
60
- COPY app.R /code/
 
 
 
 
 
 
 
 
 
 
61
 
62
  EXPOSE 7860
63
 
64
- CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=7860)"]
 
1
  # ============================================================
2
+ # QTL Mapping Suite β€” Dockerfile for HuggingFace Spaces
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
+
12
+ # ── System dependencies ──────────────────────────────────
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
  libcurl4-openssl-dev \
15
  libssl-dev \
 
21
  libpng-dev \
22
  libtiff5-dev \
23
  libjpeg-dev \
24
+ libcairo2-dev \
25
+ libxt-dev \
26
  libgit2-dev \
 
27
  pandoc \
 
 
 
 
 
 
 
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\
65
+ site_dir /srv/shiny-server;\n\
66
+ log_dir /var/log/shiny-server;\n\
67
+ directory_index on;\n\
68
+ }\n\
69
+ }' > /etc/shiny-server/shiny-server.conf
70
 
71
  EXPOSE 7860
72
 
73
+ CMD ["/usr/bin/shiny-server"]