Skip to content

Latest commit

 

History

History
114 lines (64 loc) · 7.19 KB

setup.md

File metadata and controls

114 lines (64 loc) · 7.19 KB

Software Setup

In order to be able to execute the notebooks with the tutorials, you should configure your workspace following one of the options below. If you have trouble or need help setting the workspace up, you can contact the GW community at ask.igwn.org. We encourage the participants to test the following steps beforehand of the hands-on sessions.

The various options are listed in order of difficulty. However, whenever possible, we recommend the participants with some experience with Python environments to follow Option 3, installing the requirements on their laptops and executing the tutorial notebooks from there. This has the advantage of avoiding any possible issue with online servers, including unstable internet connection or uneven memory and server availability, both on Colab and on MyBinder.

Option 1: Run in mybinder

Easy (No software installation; Works for any OS)

Video instructions

To run the notebooks, click the badge: Binder

This will build a Docker image (if not already present) with the dependency file environment.yml. Then a JupyterHub server will be open hosting the contents of the gw-odw/odw-2022 repo. To find the Tutorials, click the folders Tutorials, and then Day 1, Day 2, or Day 3 to find the tutorials.

Option 2: Google Colab

Easy (No software installation; Works for any OS)

Video instructions

  1. To run the notebooks, click the badge: Colab

  2. Double click the notebook of your choice

  3. At the top of the notebook, uncomment any pip install commands by removing the #

    #! pip install -q 'gwosc==0.5.4 <-- Remove the # and run

    Warnings: a couple of warning messages are likely to show up, both of them are harmless.

    • Unrecognized runtime "igwn-py3#"; defaulting to "python3"

      This pop-up simply notifies you that this notebook has been created with a Python environment different than the default one of Colab. That's not a big deal because you will install all the missing dependencies with the command above.

    • WARNING: This notebook was not authored by Google.

      Same as before. Just close the pop-up and go ahead without worrying too much.

  4. Click run all from the runtime menu at the top

If you are not familiar with google Colab, you can beforehand take a look at the guides offered by Google at this link, in the "Examples" tab. In particular, it is recommended to have a certain understanding of the main features of notebooks, which you can learn in this tutorial.

Intermediate (Some software installation; Will not work on Windows PC)

Video instructions

This workshop uses Python version 3.9. We recommend creating a Python virtual environment and install all the package dependencies there. The official environment with all the required packages is igwn-py39, available from the International Gravitational-Wave Observatory Network (IGWN) community website.

This guide will walk you through the configuration of this environment with Conda.

  1. Install miniconda:

    You may need to restart your computer after installation.

  2. To install the full igwn-py39 environment (recommended), download the YML dependencies file for the IGWN website:

  3. Add the conda-forge channel

    conda config --add channels conda-forge

  4. Create the environment.

    conda env create --file igwn-py39.yaml

  5. Clone the workshop git repo

    git clone https://github.com/gw-odw/odw-2022.git

  6. Move into the directory with the workshop git repo

    cd odw-2022

  7. Activate the environment.

    conda activate igwn-py39

  8. Build a custom jupyter kernel using the command

python -m ipykernel install --user --name igwn-py39 --display-name "Python (igwn-py39)"

  • For Windows users working with WSL, a change is needed to access the notebook. Run jupyter notebook --generate-config to generate the file ~/.jupyter/jupyter_notebook_config.py, and in this file change the following line: #c.NotebookApp.use_redirect_file = True to #c.NotebookApp.use_redirect_file = False
  1. Start the Jupyter notebook server
    jupyter notebook and select the kernel igwn-py39 if this is not done by default.

Notebooks: If you are not familiar with Jupyter notebooks, google one of the many introductory guides available on the internet, like this one. Also, taking a look at the Examples offered by Google Colab can be helpful.

Option 4: Linux install on Windows 10 with dedicated app (Windows 10 only)

Advanced (For Windows 10)

Install a Linux distribution on your Windows system. See instructions over here. Please indicate to us any problem or misunderstanding that you meet when following these steps. You can make comment directly on ask.igwn.org