-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update or tweak pkg to run shiny application via Docker
- Loading branch information
Showing
278 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Build according to a specified version of R | ||
ARG R_VERSION | ||
ARG R_VERSION=${R_VERSION:-4.1.0} | ||
|
||
############# Build Stage: base ################## | ||
|
||
# Get shiny+tidyverse+devtools packages from rocker image | ||
FROM rocker/shiny-verse:${R_VERSION} as base | ||
|
||
# Install system libraries of general use | ||
RUN apt-get update --allow-releaseinfo-change --fix-missing \ | ||
&& apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
libglpk-dev \ | ||
libcurl4-openssl-dev \ | ||
libxml2-dev \ | ||
libssl-dev \ | ||
libxtst6 \ | ||
libxt6 \ | ||
xdg-utils \ | ||
&& apt clean autoclean \ | ||
&& apt autoremove --yes \ | ||
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ | ||
|
||
# Create package directory | ||
ENV PACKAGE_DIR=/bieulergy | ||
|
||
# Make package as working directory | ||
WORKDIR ${PACKAGE_DIR} | ||
|
||
# Copy package code to Docker image | ||
COPY . ${PACKAGE_DIR} | ||
|
||
# Install all package dependencies | ||
RUN Rscript "${PACKAGE_DIR}/install_r_packages.R" | ||
|
||
# Install package | ||
RUN Rscript -e 'pkg_dir <- Sys.getenv("PACKAGE_DIR"); devtools::install(pkg_dir, dependencies=TRUE)' | ||
|
||
# Copy bash script that starts shiny-server | ||
COPY inst/shiny/shiny-server.sh /user/bin/shiny-server.sh | ||
|
||
# Allow permissions to execute the bash script | ||
RUN chmod a+x /user/bin/shiny-server.sh | ||
|
||
# Make Shiny app available at port 3838 | ||
EXPOSE 3838 | ||
|
||
# Execute the bash script to launch shiny app | ||
CMD ["/bin/bash", "-c", "/user/bin/shiny-server.sh"] |
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
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '3.9' | ||
|
||
x-r-version: | ||
&r-version | ||
R_VERSION=4.1.0 | ||
|
||
x-bieulergy-git-repo: | ||
&bieulergy-git-repo | ||
https://github.com/montilab/bieulergy.git#dev | ||
|
||
services: | ||
bieulergy: | ||
container_name: bieulergy | ||
image: montilab/bieulergy:latest | ||
build: | ||
context: *bieulergy-git-repo | ||
dockerfile: Dockerfile.shiny | ||
args: | ||
- *r-version | ||
restart: always | ||
ports: | ||
- 1234:3838 |
Empty file.
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/accessible-code-block-0.0.1/empty-anchor.js
100644 → 100755
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/core-js-2.5.3/package.json
100644 → 100755
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-10-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-11-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-12-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-13-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-14-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-7-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-7-2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-7-3.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-7-4.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-8-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-8-2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-8-3.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/figure-html/unnamed-chunk-9-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/htmlwidgets-1.5.3/htmlwidgets.js
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/react-17.0.0/react-dom.min.js
100644 → 100755
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/reactable-binding-0.2.3/reactable.js
100644 → 100755
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/reactwidget-1.0.0/react-tools.js
100644 → 100755
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/reactwidget-1.0.0/react-tools.js.map
100644 → 100755
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/acceptDeleteIcon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/addNodeIcon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/backIcon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/connectIcon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/cross.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/cross2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/deleteIcon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/downArrow.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/editIcon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/leftArrow.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/minus.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/plus.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/rightArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/upArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/centrality_files/vis-4.20.1/img/network/zoomExtends.png
100644 → 100755
Oops, something went wrong.
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/centrality_files/visNetwork-binding-2.0.9/visNetwork.js
100644 → 100755
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/data_files/accessible-code-block-0.0.1/empty-anchor.js
100644 → 100755
Empty file.
Empty file modified
0
docs/articles/docs/data_files/htmlwidgets-1.5.3/htmlwidgets.js
100644 → 100755
Empty file.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/acceptDeleteIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/addNodeIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/backIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/connectIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/cross.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/cross2.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/deleteIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/downArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/editIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/leftArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/minus.png
100644 → 100755
Oops, something went wrong.
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/rightArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/upArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/data_files/vis-4.20.1/img/network/zoomExtends.png
100644 → 100755
Oops, something went wrong.
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/data_files/visNetwork-binding-2.0.9/visNetwork.js
100644 → 100755
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/objects_files/accessible-code-block-0.0.1/empty-anchor.js
100644 → 100755
Empty file.
Empty file modified
0
docs/articles/docs/objects_files/figure-html/unnamed-chunk-15-1.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/htmlwidgets-1.5.3/htmlwidgets.js
100644 → 100755
Empty file.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/acceptDeleteIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/addNodeIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/backIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/connectIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/cross.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/cross2.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/deleteIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/downArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/editIcon.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/leftArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/minus.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/plus.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/rightArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/upArrow.png
100644 → 100755
Oops, something went wrong.
Empty file modified
0
docs/articles/docs/objects_files/vis-4.20.1/img/network/zoomExtends.png
100644 → 100755
Oops, something went wrong.
Empty file.
Empty file.
Empty file modified
0
docs/articles/docs/objects_files/visNetwork-binding-2.0.9/visNetwork.js
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
# Load R packages | ||
library(shiny) | ||
library(bieulergy) | ||
|
||
# Set limitation for uploading files | ||
options(shiny.maxRequestSize=30*1024^2) | ||
|
||
# Create a shiny app object | ||
bieulergy::run.shiny(host='0.0.0.0', port=3838) |
Empty file.
Empty file.
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
PACKAGE_DIR=/bieulergy | ||
|
||
# Make sure the directory for individual app logs exists | ||
mkdir -p /var/log/shiny-server | ||
chown shiny.shiny /var/log/shiny-server | ||
|
||
if [ "$APPLICATION_LOGS_TO_STDOUT" != "false" ]; | ||
then | ||
# push the "real" application logs to stdout with xtail in detached mode | ||
exec xtail /var/log/shiny-server/ & | ||
fi | ||
|
||
# Start shiny server | ||
exec Rscript $PACKAGE_DIR/inst/shiny/run_bieulergy_shiny.R 2>&1 |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
# Create a list of start-up packages | ||
startup_packages <- c("BiocManager", "dplyr", "rvest", "xml2", "yaml") | ||
|
||
# Select only the packages that aren't currently installed in the system | ||
install_startup_packages <- startup_packages[which(!startup_packages %in% utils::installed.packages())] | ||
|
||
# And finally we install the required packages | ||
for(pkg in install_startup_packages) utils::install.packages(pkg, dependencies=TRUE, repos='http://cran.rstudio.com/') | ||
|
||
# Load packages | ||
library(BiocManager) | ||
library(dplyr) | ||
library(rvest) | ||
library(xml2) | ||
library(yaml) | ||
|
||
# Get all available Bioconductor packages | ||
url <- 'https://www.bioconductor.org/packages/release/bioc/' | ||
biocPackages <- url %>% | ||
xml2::read_html() %>% | ||
rvest::html_table() %>% | ||
.[[1]] %>% | ||
dplyr::select(Package) %>% | ||
dplyr::mutate(source = 'BioConductor') | ||
|
||
# Read in package dependencies in DESCRIPTION | ||
DESCRIPTION <- yaml::read_yaml("DESCRIPTION") | ||
|
||
# Extract all imports packages | ||
required_pkgs <- trimws(strsplit(DESCRIPTION$Imports, ",", fixed=TRUE)[[1]]) | ||
|
||
# Extract all required Bioconductor packages | ||
bioconductor_pkgs <- required_pkgs[which(required_pkgs %in% biocPackages$Package)] | ||
|
||
# Select only the packages that aren't currently installed in the system | ||
install_bioconductor_pkgs <- bioconductor_pkgs[which(!bioconductor_pkgs %in% utils::installed.packages())] | ||
|
||
# And finally we install the required packages | ||
for(pkg in install_bioconductor_pkgs) BiocManager::install(pkg) | ||
|
||
# Extract all required CRAN packages | ||
cran_pkgs <- required_pkgs[which(!required_pkgs %in% bioconductor_pkgs)] | ||
|
||
# Select only the packages that aren't currently installed in the system | ||
install_cran_pkgs <- cran_pkgs[which(!cran_pkgs %in% utils::installed.packages())] | ||
|
||
# And finally we install the required packages including their dependencies | ||
for(pkg in install_cran_pkgs) utils::install.packages(pkg, dependencies=TRUE, repos='http://cran.rstudio.com/') |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.