Skip to content

Instantly share code, notes, and snippets.

@joowkim
Created July 19, 2022 17:59
Show Gist options
  • Save joowkim/e09666e55573dcd7585aadb3b9de2c86 to your computer and use it in GitHub Desktop.
Save joowkim/e09666e55573dcd7585aadb3b9de2c86 to your computer and use it in GitHub Desktop.
Dockerfile
FROM rocker/r-ver
RUN /rocker_scripts/install_tidyverse.sh
RUN /rocker_scripts/install_python.sh
RUN R --quiet -e 'BiocManager::install("preprocessCore")'
RUN R --quiet -e 'install.packages("pacman", repos="http://cran.us.r-project.org")'
RUN R --quiet -e 'pacman::p_install("methods")'
RUN R --quiet -e 'pacman::p_install("lattice")'
RUN R --quiet -e 'pacman::p_install("readxl")'
RUN R --quiet -e 'pacman::p_install("yaml")'
RUN R --quiet -e 'pacman::p_install("kableExtra")'
RUN R --quiet -e 'pacman::p_install("NMF")'
RUN R --quiet -e 'pacman::p_install("RColorBrewer")'
RUN R --quiet -e 'pacman::p_install("SNPRelate")'
RUN R --quiet -e 'pacman::p_install("argyle")'
RUN R --quiet -e 'pacman::p_install("DT")'
RUN R --quiet -e 'pacman::p_install("Matrix")'
#RUN R --quiet -e 'pacman::p_install("tidverse")'
#RUN pip3 install awswrangler
# see https://carpentries-incubator.github.io/singularity-introduction/01-singularity-gettingstarted/index.html
# see https://divingintogeneticsandgenomics.rbind.io/post/run-rstudio-server-with-singularity-on-hpc/
# download tidyverse docker image
singularity pull --name rstudio.simg docker://rocker/tidyverse:latest
# run singularity to excute a script outside of the container
singularity exec tidyverse.simg Rscript test.R
# singualrity let R in the container takes arguement from the outside of the container
singularity exec tidyverse.simg Rscript test1.R mpg.csv
# docker build -t account_id/repo_name .
# docker tag jjjkim/cptac jjjkim/cptac-docker:v1
docker push jjjkim/cptac-docker:v1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment