-
Notifications
You must be signed in to change notification settings - Fork 0
Instructions for running in Docker
Below are details of how to get the CollateralVulnerability2016 R package running inside a docker container. This is useful because it removes any machine or platform-specific dependencies or issues that may cause problems when running the pipeline and makes the pipeline more portable.
Make a VM with enough RAM and CPU -
docker-machine create --driver virtualbox --virtualbox-cpu-count 4 --virtualbox-memory "12024" bigvm
Set big VM as default:
eval $(docker-machine env bigvm)
Launch a new docker container from bioconductor -
docker run -d -p 8787:8787 bioconductor/release_core
Get the IP address of the docker machine:
docker-machine ip bigvm
Can then log into rstudio on VM as rstudio/rstudio:
http://ip-address:8787/
Launch a bash session on a running container:
docker exec -it <container-id> bash
Launch R and install packages
source("https://bioconductor.org/biocLite.R")
biocLite()
biocLite(c('GOSemSim', 'biomaRt', 'ensembldb', 'EnsDb.Hsapiens.v79', 'RTCGA'))
install.packages(c('dplyr', 'tidyr', 'shiny', 'BiSEp', 'devtools', 'readr', 'DT', 'roxygen2'))
devtools::install_github('chapmandu2/CollateralVulnerability2016')
Come out of R into bash to install ruby and intermine gem
apt-get install ruby-full
gem install intermine
exit
You will now have a virtual machine running a docker container that can run the CV pipeline successfully. Now make an image so that next time we don't have to go through all of the installation:
docker stop
docker commit <installed-container-id> <installed-image-name>
Next time we can launch a container with the image as below, we also open an additional port for shiny to use:
docker run -d -p 8787:8787 -p 6793:6793 <installed-image-name>
When we get to the point of the R script where we launch the shiny app, we then just need to change the following options:
options(shiny.port = 6793)
options(shiny.host = '0.0.0.0')
And we can then view the shiny app in the host machine browser as follows:
http://ip-address:6793/
See Docker website for more more details...
To do:
- Implement as dockerfile
- Share volumes