Commit 1bf6d75f authored by Amine  GHOZLANE's avatar Amine GHOZLANE
Browse files

Fix for rNVD3shaman for docker install

parent de23e039
Pipeline #36346 passed with stages
in 119 minutes and 33 seconds
FROM ubuntu:18.04 FROM ubuntu:18.04
ARG SOURCE_VERSION=202007 ARG SOURCE_VERSION=202009
MAINTAINER Amine Ghozlane "amine.ghozlane@pasteur.fr" MAINTAINER Amine Ghozlane "amine.ghozlane@pasteur.fr"
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
...@@ -41,7 +41,7 @@ RUN wget --no-verbose https://cran.r-project.org/src/base/R-3/R-3.6.1.tar.gz -P ...@@ -41,7 +41,7 @@ RUN wget --no-verbose https://cran.r-project.org/src/base/R-3/R-3.6.1.tar.gz -P
wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_${SOURCE_VERSION}.tar.gz -P /opt && \ wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_${SOURCE_VERSION}.tar.gz -P /opt && \
mkdir /opt/packman mkdir /opt/packman
RUN R -e """install.packages('packrat', repos='http://cran.univ-paris1.fr/');library("packrat");packrat::unbundle('/opt/shaman_package_${SOURCE_VERSION}.tar.gz', '/opt/packman')""" RUN R -e """install.packages('devtools', repos='http://cran.univ-paris1.fr/');devtools::install_github('rstudio/packrat');packrat::unbundle('/opt/shaman_package_${SOURCE_VERSION}.tar.gz', '/opt/packman')"""
COPY docker_inst/shiny-server.conf /etc/shiny-server/shiny-server.conf COPY docker_inst/shiny-server.conf /etc/shiny-server/shiny-server.conf
COPY docker_inst/.Rprofile /srv/shiny-server/ COPY docker_inst/.Rprofile /srv/shiny-server/
......
...@@ -25,61 +25,62 @@ Hereafter is the global workflow of the SHAMAN application: ...@@ -25,61 +25,62 @@ Hereafter is the global workflow of the SHAMAN application:
SHAMAN is available for R 3.6.1. Here are different ways to install the application: SHAMAN is available for R 3.6.1. Here are different ways to install the application:
### R install ### Docker install
R install will require Gfortran on mac (https://cran.r-project.org/bin/macosx/tools/) and Rtools on windows (https://cran.r-project.org/bin/windows/Rtools/index.html). Docker install is the easiest way to use SHAMAN locally. First, install docker:
Of note, raw data submission is not possible with this version.The installation, download and execution can all be performed with a small R script : - Install docker on ubuntu (Linux): https://docs.docker.com/engine/installation/linux/ubuntulinux/
``` - Install docker on Windows and Mac: https://www.docker.com/
# Load shiny packages
if(!require('shiny')){
install.packages('shiny')
library(shiny)
}
# Install dependencies, download last version of SHAMAN from github and run shaman in one command : Now in your terminal:
runGitHub('aghozlane/shaman')
``` ```
This script can also be executed as following : docker pull aghozlane/shaman && docker run --rm -p 80:80 -p 5438:5438 aghozlane/shaman
``` ```
chmod +x ./shaman/www/shaman.R && Rscript ./shaman/www/shaman.R Then connect to http://0.0.0.0/ with your favorite web navigator.
Failed: port is already allocated ?
```
docker run --rm -p 3838:80 -p 5438:5438 aghozlane/shaman
```
Then connect to http://0.0.0.0:3838/.
Docker update after an update of SHAMAN:
```
docker pull aghozlane/shaman
``` ```
### R install with packrat (linux only) ### R install with packrat (linux only)
SHAMAN is available for R=3.6.1. Packrat framework allows an easy installation of all the dependencies. Of note, raw data submission is not possible with this version. SHAMAN is available for R=3.6.1. Packrat framework allows an easy installation of all the dependencies. Of note, raw data submission is not possible with this version.
``` ```
# Download packrat package # Download packrat package
wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_202007.tar.gz wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_202009.tar.gz
mkdir packrat/shaman mkdir packrat/
``` ```
Now you can run R: Now you can run R:
``` ```
install.packages("packrat") install.packages("devtools")
packrat::unbundle("shaman_package_202007.tar.gz", "packrat/shaman") devtools::install_github("rstudio/packrat")
packrat::unbundle("shaman_package_202009.tar.gz", "packrat/")
packrat::init("packrat/shaman") packrat::init("packrat/shaman")
system("Rscript -e 'shiny::runGitHub("pierreLec/KronaRShy",port=5438)'",wait=FALSE), system("Rscript -e 'shiny::runGitHub("pierreLec/KronaRShy",port=5438)'",wait=FALSE),
shiny::runGitHub('aghozlane/shaman') shiny::runGitHub('aghozlane/shaman')
``` ```
### Docker install
Docker install is the easiest way to use SHAMAN locally. First, install docker: ### R install (deprecated)
- Install docker on ubuntu (Linux): https://docs.docker.com/engine/installation/linux/ubuntulinux/
- Install docker on Windows and Mac: https://www.docker.com/
Now in your terminal: R install will require Gfortran on mac (https://cran.r-project.org/bin/macosx/tools/) and Rtools on windows (https://cran.r-project.org/bin/windows/Rtools/index.html).
``` Of note, raw data submission is not possible with this version.The installation, download and execution can all be performed with a small R script :
docker pull aghozlane/shaman && docker run --rm -p 80:80 -p 5438:5438 aghozlane/shaman
```
Then connect to http://0.0.0.0/ with your favorite web navigator.
Failed: port is already allocated ?
``` ```
docker run --rm -p 3838:80 -p 5438:5438 aghozlane/shaman # Load shiny packages
if(!require('shiny')){
install.packages('shiny')
library(shiny)
}
# Install dependencies, download last version of SHAMAN from github and run shaman in one command :
runGitHub('aghozlane/shaman')
``` ```
Then connect to http://0.0.0.0:3838/. This script can also be executed as following :
Docker update after an update of SHAMAN:
``` ```
docker pull aghozlane/shaman chmod +x ./shaman/www/shaman.R && Rscript ./shaman/www/shaman.R
``` ```
### CONDA ### CONDA
......
...@@ -227,17 +227,18 @@ function(request) { ...@@ -227,17 +227,18 @@ function(request) {
tabPanel("R install with Packrat (linux only)", tabPanel("R install with Packrat (linux only)",
p("SHAMAN is available for R=3.6.1. Packrat framework allows an easy installation of all the dependencies. Of note, raw data submission is not possible with this version.",style = "font-family: 'times'; font-si16pt"), p("SHAMAN is available for R=3.6.1. Packrat framework allows an easy installation of all the dependencies. Of note, raw data submission is not possible with this version.",style = "font-family: 'times'; font-si16pt"),
mainPanel(div(style = 'max-width: 900px; word-wrap: break-word;', mainPanel(div(style = 'max-width: 900px; word-wrap: break-word;',
"# Download packrat package",br(),"wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_201909.tar.gz", br(), "# Download packrat package",br(),"wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_202009.tar.gz", br(),
"mkdir packrat/shaman"), width=9,class="mainwell"), "mkdir packrat/"), width=9,class="mainwell"),
p("Now you can run R:"), p("Now you can run R:"),
mainPanel(div(style = 'max-width: 900px; word-wrap: break-word;', mainPanel(div(style = 'max-width: 900px; word-wrap: break-word;',
"install.packages(\"packrat\")",br(), "install.packages(\"devtools\")",br(),
"packrat::unbundle(\"shaman_package_201909.tar.gz\", \"packrat/shaman\")", br(), "devtools::install_github(\"rstudio/packrat\")",br(),
"packrat::unbundle(\"shaman_package_202009.tar.gz\", \"packrat/\")", br(),
"packrat::init(\"packrat/shaman\")",br(), "packrat::init(\"packrat/shaman\")",br(),
"system(\"Rscript -e 'shiny::runGitHub(\\\"pierreLec/KronaRShy\\\",port=5438)'\",wait=FALSE)", "system(\"Rscript -e 'shiny::runGitHub(\\\"pierreLec/KronaRShy\\\",port=5438)'\",wait=FALSE)",
br(),"shiny::runGitHub('aghozlane/shaman')"),width=9,class="mainwell")), br(),"shiny::runGitHub('aghozlane/shaman')"),width=9,class="mainwell")),
tabPanel("R install", tabPanel("R install (deprecated)",
p("SHAMAN is available for R=3.6.1. Gfortran is required on mac (https://cran.r-project.org/bin/macosx/tools/) and Rtools on windows (https://cran.r-project.org/bin/windows/Rtools/index.html). p("SHAMAN is available for R=3.6.1. Gfortran is required on mac (https://cran.r-project.org/bin/macosx/tools/) and Rtools on windows (https://cran.r-project.org/bin/windows/Rtools/index.html).
Of note, raw data submission is not possible with this version. Of note, raw data submission is not possible with this version.
The installation, download and execution can all be performed with a small R script:",style = "font-family: 'times'; font-si16pt"), The installation, download and execution can all be performed with a small R script:",style = "font-family: 'times'; font-si16pt"),
......
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