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

Fix for rNVD3shaman for docker install

parent de23e039
Pipeline #36346 passed with stages
in 119 minutes and 33 seconds
FROM ubuntu:18.04
ARG SOURCE_VERSION=202007
ARG SOURCE_VERSION=202009
MAINTAINER Amine Ghozlane "amine.ghozlane@pasteur.fr"
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
wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_${SOURCE_VERSION}.tar.gz -P /opt && \
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/.Rprofile /srv/shiny-server/
......
......@@ -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:
### 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).
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 :
```
# Load shiny packages
if(!require('shiny')){
install.packages('shiny')
library(shiny)
}
Docker install is the easiest way to use SHAMAN locally. First, install docker:
- Install docker on ubuntu (Linux): https://docs.docker.com/engine/installation/linux/ubuntulinux/
- Install docker on Windows and Mac: https://www.docker.com/
# Install dependencies, download last version of SHAMAN from github and run shaman in one command :
runGitHub('aghozlane/shaman')
Now in your terminal:
```
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)
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
wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_202007.tar.gz
mkdir packrat/shaman
wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_202009.tar.gz
mkdir packrat/
```
Now you can run R:
```
install.packages("packrat")
packrat::unbundle("shaman_package_202007.tar.gz", "packrat/shaman")
install.packages("devtools")
devtools::install_github("rstudio/packrat")
packrat::unbundle("shaman_package_202009.tar.gz", "packrat/")
packrat::init("packrat/shaman")
system("Rscript -e 'shiny::runGitHub("pierreLec/KronaRShy",port=5438)'",wait=FALSE),
shiny::runGitHub('aghozlane/shaman')
```
### Docker install
Docker install is the easiest way to use SHAMAN locally. First, install docker:
- Install docker on ubuntu (Linux): https://docs.docker.com/engine/installation/linux/ubuntulinux/
- Install docker on Windows and Mac: https://www.docker.com/
### R install (deprecated)
Now in your terminal:
```
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 ?
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 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/.
Docker update after an update of SHAMAN:
This script can also be executed as following :
```
docker pull aghozlane/shaman
chmod +x ./shaman/www/shaman.R && Rscript ./shaman/www/shaman.R
```
### CONDA
......
......@@ -227,17 +227,18 @@ function(request) {
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"),
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(),
"mkdir packrat/shaman"), width=9,class="mainwell"),
"# Download packrat package",br(),"wget ftp://shiny01.hosting.pasteur.fr/pub/shaman_package_202009.tar.gz", br(),
"mkdir packrat/"), width=9,class="mainwell"),
p("Now you can run R:"),
mainPanel(div(style = 'max-width: 900px; word-wrap: break-word;',
"install.packages(\"packrat\")",br(),
"packrat::unbundle(\"shaman_package_201909.tar.gz\", \"packrat/shaman\")", br(),
"install.packages(\"devtools\")",br(),
"devtools::install_github(\"rstudio/packrat\")",br(),
"packrat::unbundle(\"shaman_package_202009.tar.gz\", \"packrat/\")", br(),
"packrat::init(\"packrat/shaman\")",br(),
"system(\"Rscript -e 'shiny::runGitHub(\\\"pierreLec/KronaRShy\\\",port=5438)'\",wait=FALSE)",
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).
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"),
......
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