Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +65 -65
Dockerfile
CHANGED
|
@@ -1,79 +1,79 @@
|
|
| 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 |
-
#
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
| 12 |
libcurl4-openssl-dev \
|
| 13 |
libssl-dev \
|
| 14 |
libxml2-dev \
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
&& rm -rf /var/lib/apt/lists/*
|
| 28 |
|
| 29 |
-
#
|
| 30 |
-
RUN
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
|
| 38 |
-
#
|
| 39 |
-
RUN
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
qtl \
|
| 45 |
-
ggplot2 \
|
| 46 |
plotly \
|
|
|
|
|
|
|
| 47 |
DT \
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
&& rm -rf /tmp/downloaded_packages
|
| 55 |
|
| 56 |
-
#
|
| 57 |
-
RUN
|
| 58 |
-
'run_as shiny;' \
|
| 59 |
-
'server {' \
|
| 60 |
-
' listen 7860;' \
|
| 61 |
-
' location / {' \
|
| 62 |
-
' site_dir /srv/shiny-server;' \
|
| 63 |
-
' log_dir /var/log/shiny-server;' \
|
| 64 |
-
' directory_index on;' \
|
| 65 |
-
' }' \
|
| 66 |
-
'}' \
|
| 67 |
-
> /etc/shiny-server/shiny-server.conf
|
| 68 |
|
| 69 |
-
#
|
| 70 |
-
|
| 71 |
|
| 72 |
-
#
|
| 73 |
-
RUN
|
| 74 |
-
&& chmod -R 755 /srv/shiny-server \
|
| 75 |
-
&& mkdir -p /var/log/shiny-server \
|
| 76 |
-
&& chown -R shiny:shiny /var/log/shiny-server
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
EXPOSE 7860
|
| 79 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM rocker/shiny:latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
# Set working directory inside container
|
| 4 |
+
WORKDIR /code
|
| 5 |
+
|
| 6 |
+
# Install additional system dependencies including libglpk for igraph
|
| 7 |
+
RUN apt-get update && apt-get install -y \
|
| 8 |
libcurl4-openssl-dev \
|
| 9 |
libssl-dev \
|
| 10 |
libxml2-dev \
|
| 11 |
+
libnlopt-dev \
|
| 12 |
+
libicu-dev \
|
| 13 |
+
libgdal-dev \
|
| 14 |
+
libgeos-dev \
|
| 15 |
+
libproj-dev \
|
| 16 |
+
libv8-dev \
|
| 17 |
+
libnode-dev \
|
| 18 |
+
libglpk-dev \
|
| 19 |
+
libglpk40 \
|
| 20 |
+
zlib1g-dev \
|
| 21 |
+
libbz2-dev \
|
| 22 |
+
liblzma-dev \
|
| 23 |
&& rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
+
# Install DT dependencies first
|
| 26 |
+
RUN install2.r --error \
|
| 27 |
+
htmltools \
|
| 28 |
+
htmlwidgets \
|
| 29 |
+
jsonlite \
|
| 30 |
+
crosstalk \
|
| 31 |
+
magrittr \
|
| 32 |
+
promises
|
| 33 |
|
| 34 |
+
# Then install the main packages (excluding QTLseqr and vcfR for now)
|
| 35 |
+
RUN install2.r --error \
|
| 36 |
+
nloptr \
|
| 37 |
+
lme4 \
|
| 38 |
+
emmeans \
|
| 39 |
+
readxl \
|
|
|
|
|
|
|
| 40 |
plotly \
|
| 41 |
+
shinyjs \
|
| 42 |
+
shinyWidgets \
|
| 43 |
DT \
|
| 44 |
+
RColorBrewer \
|
| 45 |
+
ggrepel \
|
| 46 |
+
openxlsx
|
| 47 |
+
|
| 48 |
+
# Install tidyverse and igraph
|
| 49 |
+
RUN install2.r --error tidyverse igraph
|
|
|
|
| 50 |
|
| 51 |
+
# Install data.table separately
|
| 52 |
+
RUN install2.r --error data.table
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
# Install BiocManager
|
| 55 |
+
RUN R -e "install.packages('BiocManager', repos='https://cloud.r-project.org/')"
|
| 56 |
|
| 57 |
+
# Install Bioconductor dependencies
|
| 58 |
+
RUN R -e "BiocManager::install(c('GenomicRanges', 'IRanges', 'S4Vectors', 'Biostrings', 'Rsamtools', 'GenomeInfoDb'), ask=FALSE, update=FALSE)"
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
# Install vcfR package
|
| 61 |
+
RUN install2.r --error vcfR
|
| 62 |
+
|
| 63 |
+
# Install remotes for GitHub installations
|
| 64 |
+
RUN install2.r --error remotes
|
| 65 |
+
|
| 66 |
+
# Install QTLseqr from GitHub
|
| 67 |
+
RUN R -e "remotes::install_github('bmansfeld/QTLseqr', upgrade='never', dependencies=FALSE)"
|
| 68 |
+
|
| 69 |
+
# Create www directory and health file directly
|
| 70 |
+
RUN mkdir -p /code/www && echo "OK" > /code/www/health
|
| 71 |
+
|
| 72 |
+
# Copy app code
|
| 73 |
+
COPY app.R /code/
|
| 74 |
+
|
| 75 |
+
# Expose the port Shiny will run on
|
| 76 |
EXPOSE 7860
|
| 77 |
+
|
| 78 |
+
# Run the app with corrected host address
|
| 79 |
+
CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=7860)"]
|