R images used in projects in the Lab
10K+
This repo is to ensure reproducibility of the lab. This tutorial helped us to build and maintain this repo, many thanks.
hcp4715/rdock:fadpls, arm64, is for our study on FAD+ scale.hcp4715/rdock:fadpls_amd64, amd64, is for our study on FAD+ scale.hcp4715/rdock:nhb2024, arm64, is for our comment on generalizability illusion.Please see here for why using docker.
Linux (ubuntu): https://docs.docker.com/engine/install/ubuntu/
Windows 10: https://docs.docker.com/docker-for-windows/install/
Mac OS: https://docs.docker.com/docker-for-mac/install/
Make sure that docker was successfully installed on your machine
docker pull hcp4715/rdock:fadpls # This is the image for FAD+ project
docker run -e PASSWORD=hulab --cpus=4 -it --rm -p 8787:8787 -v ${PWD}:/home/rstudio/work hcp4715/rdock:fadpls
docker run ---- Run a docker image in a container
-e PASSWORD=hulab ---- set a password for rstudio, you can set your own password.
-it ---- Keep STDIN open even if not attached
--rm ---- Automatically remove the container when it exits
--cpus=4 ---- Number of cores will be used by docker. Make sure that your machine has more thread than the number here.
-v ---- Mount a folder to the container.
${PWD} ---- The current working directory.
/home/rstudio/work ---- The directory inside the docker image (the mounting point of the local folder in the docker image). Note that the docker container itself likes a mini virtual Linux system, so the file system inside it is Linux style.
-p ---- Publish a container’s port(s) to the host
hcp4715/rdock:fadpls ---- The docker image to run. Note that you should include the tag :fadpls part, otherwise docker will instead use "hcp4715/rdock:latest".
After running the code above, you shall see output as below:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] userconf: executing...
[cont-init.d] userconf: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
...
Then, open your broswer (e.g., firefox, chrome), and try one of the following url in the address:
localhost:8787
http://192.168.99.100:8787
You will be asked to input username and password
Username: rstudio Password: hulab
Now, you will see the familiar interface of rstudio! In the browser!
Run the code below to test whether the image works
# load the libraries
library(tidyverse)
Content type
Image
Digest
sha256:a5e3389ef…
Size
1.1 GB
Last updated
about 3 years ago
docker pull hcp4715/rdock