Commit 05c60770 authored by BLANCHET Christophe's avatar BLANCHET Christophe
Browse files

Install R and system deps for a git-repo app

parent 61c554a8
......@@ -11,15 +11,23 @@ The Biosphere Shiny app is based on the Rocker Docker Stacks ([details](https://
Change the deployed Shiny envinronment/app by filling the `APP_STACK` variable with:
1. any offcial Rocker stacks:
1. Any official Rocker stacks from [rocker-org](https://github.com/rocker-org/rocker-versioned2):
- `rocker/shiny`: Base Shiny Server.
- `rocker/shiny-verse`: adds the tidyverse suite (and devtools suite) of R packages to the rocker/shiny image.
2. the image URL from an other registry to deploy your own Shiny Docker image.
2. The image URL from an other registry to deploy your own Shiny Docker image.
3. any Shiny app from a public git repository. You need then to fill also the two variables:
3. Any Shiny app from a public git repository.
You need then to fill also the two variables:
- SHINY_REPO (in): Public Git URL of the shiny app repository
- SHINY_REPODIR (in): Directory in the git repo containing the app files (server.R, ui.R)
- SHINY_REPODIR (in): Directory in the git repo containing the app files (server.R, ui.R), by default set to '/'.
If the shiny app has R dependencies, they can be specified in a file `rinstall.txt` located in the `SHINY_REPODIR`
(See sample file `rinstall.txt.sample` in this repo).
If the shiny app has system dependency, they can be specified in a file `sysdeps.txt` located in the `SHINY_REPODIR`
(See sample file `sysdeps.txt.sample` in this repo).
### Choose R version
......
......@@ -93,9 +93,11 @@ if [[ "$APP_IMG" == *"rocker/"* ]]; then
SHINY_ARCH="$IFB_MAIN/shinyarch"
mkdir -p $SHINY_ARCH
git clone $SHINY_REPO $SHINY_ARCH
SHINY_REPODIR=${SHINY_REPODIR:-inst}
SHINY_REPODIR=${SHINY_REPODIR:-.}
rm -r $APP_DATA/*
cp -a $SHINY_ARCH/$SHINY_REPODIR/* $APP_DATA/
cp -a sysdeps.sh $APP_DATA/
docker exec $CONTAINER_ID bash /srv/shiny-server/sysdeps.sh /srv/shiny-server/sysdeps.txt
docker exec $CONTAINER_ID Rscript /srv/shiny-server/rinstall.txt
fi
fi
......
# Installation of standard R packages
install.packages("ggplot2")
# Installation of packages with BiocManager
BiocManager::install(c("DESeq2", "limma"), ask = FALSE)
# Installation of packages from Github
remotes::install_github("aursiber/DRomics")
#!/bin/bash
DIST_ID=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
DIST_CODENAME=$(lsb_release -cs)
PACKAGE_LIST=${1:-sysdeps.txt}
if [[ $DIST_ID == "ubuntu" || $DIST_ID == "debian" ]]; then
apt-get update
apt-get -y --no-install-recommends install `grep -v "^#" $PACKAGE_LIST | tr '\n' ' '`
else
echo System $DIST_ID $DIST_CODENAME not supported
exit 1
fi
\ No newline at end of file
# List of operating system package dependencies: put one package per line.
# Valid for Debian/Ubuntu only.
libudunits2-dev
libxml2-dev
libssl-dev
libpng-dev
libtiff5-dev
libjpeg-dev
libv8-dev
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment