Use GitHub Codespaces#

In addition to setting up a local computing environment to run the tutorials or using an existing JupyterHub, you can also use the Codespaces service provided by GitHub to run all tutorials here.

Note

The following steps require a GitHub account. If you don’t have one, sign up here!

1. Fork the Repository#

Login to GitHub and navigate to BOAT-ocean-acoustics/fundamentals and fork the repository under your username.

fork

2. Create a New Codespace#

In the upper right corner select + and new codespace.

new_codespace

3. Select a Machine#

Select the tutorial repository and the smallest machine.

codespace_vm

4. Open a Notebook#

You can open an existing or new notebook by navigating to New->File

NewNotebook

Run through cells of the codespaces_start.ipynb to test your set up. This will also install the necessary libraries.


5. Install Packages#

Python libraries can be directly installed within a notebook or from the terminal. The libraries needed to run the notebooks are listed in the boat_tutorials/requirements.txt file and can be installed with the command

pip install -r requirements.txt

If you need a library, you can install it directly:

pip install ipywidgets

6. Return to Codespace#

To return to a codespace navigate to https://github.com/<your_username>/codespaces/ or open the settings on the top-left triple bar and select Codespaces.

mycodespaces

7. Refresh Repository Content#

To update to the latest content sync your fork with the main repository and start a new codespace. Note you will have to run the package installation again.

SyncFork

8. Save Your Work#

A codespace is deleted if inactive for 30 days. It also restarts periodically. Regularly save your work. If you use GitHub you can commit it to your repository (either through the GitHub integration or through commands on the terminal).

github_integration

9. Stop the Codespace#

When you have finished using the codespace, make sure you stop it so you do not waste core hours. Your work will be preserved.

codespace_stop

Caution

If you have already used your Codespaces allocation for personal needs, you can clone the repository and execute the notebooks on your computer. Let us know if you encounter any setup problems.