This Rmarkdown file is a guide to producing a graph highlighting a very intersting aspect of exoplanet discoveries, which I willnot share in advance, but at hich one you might marvel at when you see it. Maybe you won't find it interesting, then maybe you are not really into it. At least, the graph will be generated using the beautiful r-package called ggplot2.
As prerequisites to run this exoplanet-graph producing docker container are the following:
-
Having git installed;
-
And having Docker installed.
For users on Windows, maybe you need to install WSL2, but Powershell should be fine as well as using a bash shell.
For now, these are the only needed software tools that I am aware of. Maybe it won't run on M1-based Macs, but this could be addressed later on.
In order to produce the plot, you will net to do the following: open a terminal session and run:
- git clone [email protected]:maxsinner5/Exoplanet_docker.git
This step downloads the needed resources to build the Docker image. The next step will be to maneuver into the docker folder:
- cd docker
and then you will run the following command:
- docker build -t yourimage .
After some time, it (hopefully) will say something like: yourimage:latest sucessfully build.
Now finally, a last command will be needed to generate the graph in the Docker container and copy it to you local machine to marvel at it. This will be done using the following command:
- docker run --rm --name yourimage_container -v /your/path/to/a/folder/to/store/graph:/output/ yourimage
This command runs the desired commands inside the Dockerfile. It first it uses the rocker/r-ver:4.1.2 as baseline image, then installs devtools and ggplot2 as inital packages into the r-session. Next, devtools is used to download the package which I build to generate a simpler version of an exoplanet dataset. This package thus allows for bit-by-bit digestion of information on exoplanets, and is used to generate a neat plot. After that, two directories are created:
-
/code, which will contain the script for the plot
-
/output, which will contain the generated graph, which will then be copied (see docker run ... command) to the local machine on which the Docker container has been running.
After the directories are set up, the r-script "exo_planet_graph.R" will be copied to the /code directory in the container, and is finally run by the last command in the Dockerfile which tells it to run the r-script.
If any issues come up, let me know via email on the adresse: [email protected].