-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/devel' into devel
- Loading branch information
Showing
1 changed file
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,40 @@ | ||
# Base R Shiny image | ||
FROM rocker/shiny | ||
FROM rocker/shiny:4.4.0 | ||
|
||
# Install system dependencies for GSL and GLPK | ||
RUN apt-get update && apt-get install -y \ | ||
libgsl-dev \ | ||
libglpk-dev | ||
|
||
# Install R dependencies early to leverage Docker layer caching | ||
RUN R -e "install.packages(c('devtools', 'BiocManager'))" | ||
|
||
RUN R -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager'); BiocManager::install(version='devel', ask=FALSE); BiocManager::install('iSEEtree')" | ||
|
||
# Install necessary Bioconductor and CRAN packages | ||
RUN R -e "BiocManager::install(c('iSEE', 'iSEEtree', 'mia', 'biomformat', 'SummarizedExperiment', 'SingleCellExperiment', 'TreeSummarizedExperiment', 'shiny', 'shinyjs', 'methods', 'utils'))" | ||
|
||
# Set the working directory | ||
WORKDIR /srv/shiny-server | ||
|
||
# Copy the entire package to the working directory | ||
# Copy the DESCRIPTION file first to leverage Docker cache if dependencies haven't changed | ||
COPY DESCRIPTION . | ||
|
||
# Install the dependencies based on the DESCRIPTION file | ||
RUN R -e "remotes::install_deps(dependencies = TRUE)" | ||
|
||
# Copy the rest of the package code | ||
COPY . . | ||
|
||
# Install R dependencies from the DESCRIPTION file | ||
RUN R -e "install.packages(c('remotes', 'BiocManager'))" | ||
RUN R -e "remotes::install_local(dependencies = TRUE, upgrade = TRUE)" | ||
# Install the local iSEEbug package and output installation logs for debugging | ||
RUN R -e "remotes::install_local('.', dependencies = TRUE, upgrade = TRUE, quiet = FALSE)" | ||
|
||
# Verify that the iSEEbug package is installed | ||
|
||
# Expose the application port | ||
EXPOSE 3838 | ||
EXPOSE 8080 | ||
|
||
# Command to run the Shiny app | ||
CMD ["R", "-e", "app <- iSEEbug::iSEEbug(); shiny::runApp(app, host = '0.0.0.0', port = 3838)"] | ||
CMD ["R", "-e", "app <- iSEEbug::iSEEbug(); shiny::runApp(app, host = '0.0.0.0', port = 8080)"] | ||
|
||
|