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.
Easy (No software installation; Works for any OS)
To run the notebooks, click the badge:
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.
Easy (No software installation; Works for any OS)
-
Double click the notebook of your choice
-
At the top of the notebook, uncomment any
pip install
commands by removing the#
#! pip install -q 'gwosc==0.5.4
<-- Remove the#
and runWarnings: 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.
-
-
Click
run all
from theruntime
menu at the top
Intermediate (Some software installation; Will not work on Windows PC)
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.
-
Install miniconda:
- Visit the website https://conda.io/en/latest/miniconda.html
- Choose the version for Python 3.9
- Follow the installation instructions for your operating system:
You may need to restart your computer after installation.
-
To install the full igwn-py39 environment (recommended), download the YML dependencies file for the IGWN website:
-
Add the conda-forge channel
conda config --add channels conda-forge
-
Create the environment.
conda env create --file igwn-py39.yaml
-
Clone the workshop git repo
git clone https://github.com/gw-odw/odw-2022.git
-
Move into the directory with the workshop git repo
cd odw-2022
-
Activate the environment.
conda activate igwn-py39
-
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
- Start the Jupyter notebook server
jupyter notebook
and select the kerneligwn-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.
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