Skip to content
Jrocker: biocverse environment 😄
R Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


CircleCI Project Status: Active – The project has reached a stable, usable state and is being actively developed.


GitHub Actions status

Install packages and dependencies is painful. It's OK to run the project after misearable searching and installing dependent libs. However, you have accesses to mulitple different OSs. Some big data are not allowed to transfer outside. So you have to install the running environment again for the whole project. Looking back own techinical blogs may solve it quickily, but some errors that you did't take the notes. You'll suffer installing & searching problem again and agian.

Above pains are what I suffered, many times. An universe solution is packing environment portable that can be run after cloning the environment.

Docker provides perfect solution. I'm newbie to the docker. The basic demands are that the tidyverse suite, rstudio server and shiny server are integrated in the images. The rocker-org kindly pre-built all images satisfy me.

Another key import question is that it's hard to install Biocondutor packages based on the raw rocker images. Searching again, Biocondutor provides core & base docker images based on the rocker/rstudio.

Review the Biocondutor release core Dockerfile code. I plan to build personal running environment for myself Jrocker.

  1. No more using bioc base2 docker as base image to construct Jrocker. Now using rocker/rstudio as base image.

  2. Outside packages are provided in the install-pkgs.R.

  3. For machine learning and deep learning project, it's hard to integrating the keras into the Jrocker. Even though JJ Allaire provided a machine learning docker image based on rocker/rstudio, I cant reproduce the basic keras example on the keras tutorial. Now I build a TensorFlow and Keras jupyter notebook basd on jupyter/scipy-notebook, and name it as Jukeras. it works fine now.

World is better after build done.

Run Jrocker

docker pull chunjiesamliu/jrocker:latest

docker run -it --rm chunjiesamliu/jrocker /usr/local/bin/R

docker run -it --rm chunjiesamliu/jrocker /bin/bash

Run rstudio server

docker run -d -p 8686:8787 \
  -v /home/liucj/:/home/liucj/ \
  -e USER=liucj -e PASSWORD=<password> \
  --name Jrocker chunjiesamliu/jrocker

Run R scripts

docker run -i --rm --user $EUID \
  --entrypoint /usr/local/bin/Rscript \
  -v /your/path/:/docker/path/ \
  chunjiesamliu/jrocker /docker/path/product.R

Run Jrocker for multiple sessions with no conflict

Every Rstudio server can run only one session, when you run one command with long time wait, you don't want to wait long time to run other command. So using jrocker to open other several sessions with no conflict, then save the data as dat.rds.gz to load into your main rstudio session.

Build jrocker

docker build -t chunjiesamliu/jrocker:latest .

docker push chunjiesamliu/jrocker:latest
You can’t perform that action at this time.