Making an Executable Paper with the Python in Heliophysics Community to Foster Open Science and Improve Reproducibility
Authors/Creators
- 1. Laboratory for Atmospheric and Space Physics (LASP), University of Colorado, Boulder, CO, United States
- 2. ADNET Systems Inc, Bethesda, MD, United States
- 3. Community Coordinated Modeling Center (CCMC), NASA Goddard Space Flight Center, Greenbelt, MD, United States
- 4. Institute of Geophysics and Planetary Physics, University of California, Los Angeles, CA, United States
- 5. Space Science Center, University of New Hampshire, Durham, NH, United States
- 6. Center for Astrophysics | Harvard & Smithsonian, Cambridge, MA, United States
Description
Stored here are the files to run the executable version of "Making an Executable Paper with the Python in Heliophysics Community to Foster Open Science and Improve Reproducibility" by Shawn Polson et al., recently published in Frontiers in Astronomy and Space Sciences.
The paper is containerized with Docker, and we offer three different ways to spin up the container:
1. Load the Docker image from our TAR file:
With Docker installed and running on your machine, first download the file pyhc-executable-paper.tar which contains the Docker image spolson/pyhc-executable-paper:v2. Then load the image with:
docker load < pyhc-executable-paper.tar
Finally, run the image and connect to the JupyterLab server that starts in the container. Unless you are familiar enough with Docker to want to do it differently, we recommend this command:
docker run --rm -p 8888:8888 --user root -e GRANT_SUDO=yes spolson/pyhc-executable-paper:v2
That will start the container with the permissions necessary to run the notebook that is the executable paper from start to finish with "Run All Cells" in the Jupyter interface (including the initialization script that installs both Python and system packages). It also maps the container's port 8888 (where JupyterLab will start) to your machine's port 8888, such that you can launch JupyterLab by simply following the URL that is generated in your terminal output. Something like: http://127.0.0.1:8888/lab?token=fd1dc3221fd13a5923bbc494b8553fe03b1183411687899a.
2. Load the Docker image from DockerHub:
Our Docker image is available on DockerHub. Simply pull the image with:
docker pull spolson/pyhc-executable-paper:v2
then run the image:
docker run --rm -p 8888:8888 --user root -e GRANT_SUDO=yes spolson/pyhc-executable-paper:v2
(Note that once the image has been pulled, the remaining steps to run the image are identical to those in #1 above.)
3. Build the Docker image from source:
We also store the source files here so that you can build the Docker image from scratch if you want. First, download both the file Dockerfile and the compressed directory src.zip. Navigate to the directory where you downloaded them, unzip src, then build the Docker image with something like:
docker build -t pyhc-executable-paper:v2 .
(Refer to Docker's documentation for help using the docker build command.)
The remaining steps to run the image are identical to those in #1 and #2 above.