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.
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.
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.
This workshop uses Python version 3.11.
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 "xxxx"; 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
Easy (No software installation; Works for any OS) - Warning: note that
mybinder
can take several minutes to load.
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 repo. To find the Tutorials, click the folders Tutorials
, and then Day 1
, Day 2
, or Day 3
to find the tutorials.
Intermediate (Some software installation; Will not work on Windows PC)
We provide a Conda environment with all the required packages.
This guide will walk you through the configuration of this environment (named odw-py311
).
-
Install Miniconda by following the installation instructions for your operating system:
Choose the "Miniconda" installer, not the full Anaconda Distribution. You may need to restart your computer after installation.
-
Add the conda-forge channel
conda config --add channels conda-forge
-
Create the environment.
conda env create --file environment.yml
-
Activate the environment.
conda activate odw-py311
-
Clone the workshop git repo
git clone https://github.com/gw-odw/odw.git
-
Move into the directory with the workshop git repo
cd odw
-
Build a custom jupyter kernel using the command
python -m ipykernel install --user --name odw-py311 --display-name "Python (odw-py311)"
-
Start the Jupyter notebook server
jupyter notebook
and select the kernelodw-py311
if this is not done by default.
Advanced (For Windows 10 or 11)
If you are using Windows and would like to run the notebooks directly, install Windows Subsystem for Linux. There are additional instructions here for getting started with the notebooks. Note that even if Conda works many packages needed for the Tutorials are not running on Windows at all, so we suggest to follow one of the previous options and not to run the Tutorials directly on Windows. Please indicate to us any problem or misunderstanding that you meet when following these steps. You can make comment directly on ask.igwn.org