Skip to content

Commit

Permalink
fix: Fix paths and add codespaces instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lsetiawan committed Dec 12, 2023
1 parent af28de7 commit 15c1510
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,44 @@ There are two important directories:
The configuration for GNATSS can be found in [`config.yaml`](./config.yaml) file.
This file will be read automatically during a GNATSS run.

## Setting up for the benchmark
## Running on the Cloud (Github Codespaces)

This repository is configured to work with Github Codespaces.
To use Github Codespaces to run the benchmark, simply click on the button below:

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/seafloor-geodesy/gnatss-fortran-benchmark/tree/main)

You'll be directed to a page that asks for various configurations for codespace.
You can leave the default values and click on "Create Codespace".
Github will then build the codespace for you, which may take a few minutes ☕.

Once your codespace is launched, follow the instructions below:

- [Visual Studio Code](https://code.visualstudio.com/) Interface will open up within your browser.
- On the left hand side, you'll see a file explorer. Navigate to a file called `main.ipynb` and open it.
- Once the notebook opens up, you need to select the kernel to run the notebook.
- Click on the "Select Kernel" button on the top right corner of the notebook.
- This will open up a drop down menu in the top center of the page.
Select "Python Environments...", and then
select "notebook (Python 3.10.13)" conda environment from the list.
- You'll know that the kernel is selected when you see
"notebook (Python 3.10.13)" in the top right corner of the notebook.
- Now you can run the notebook by clicking on the "Run All" button on the top left corner of the notebook.
Or you can choose to run the cells one by one to see what's happening in each step.

### What is Github Codespaces?

A codespace is "a development environment that's hosted in the cloud".
This particular codespace uses the [`environment.yml`](conda/environment.yml)
to create a conda environment with all the dependencies needed to run the benchmark.

GitHub currently gives every user [120 vCPU hours per month for free](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts), beyond that you must pay. **So be sure to explicitly stop or shut down your codespace when you are done by going to this page (https://github.com/codespaces).**

## Running Locally

Below are instructions for running the benchmark locally in your own machine.

### Setting up for the benchmark

To run the benchmark, you will need to have GNATSS installed.
We recommend using `conda` to install GNATSS for quick setup.
Expand All @@ -23,7 +60,7 @@ conda env create -f conda/environment.yml
conda activate gnatss-benchmark
```

## Running the benchmark
### Running the benchmark

Once the environment is setup, you can run the benchmark by spinning up
a Jupyter lab server.
Expand Down
8 changes: 4 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ solver:
harmonic_mean_start_depth: -4.0
input_files:
sound_speed:
path: ~/Repos/SSEC/gnatss-fortran-benchmark/data/NDP1_Ch_Mi_2022_fit
path: ./data/NDP1_Ch_Mi_2022_fit
travel_times: # Glob path to pxp_tt
path: ~/Repos/SSEC/gnatss-fortran-benchmark/data/pxp_tt
path: ./data/pxp_tt
gps_solution: # Glob path to POS_FREED_TRANS_TWTT
path: ~/Repos/SSEC/gnatss-fortran-benchmark/data/POS_FREED_TRANS_TWTT
path: ./data/POS_FREED_TRANS_TWTT
deletions: # Path to deletns.dat deletions file used by Chadwell code as well
path: ~/Repos/SSEC/gnatss-fortran-benchmark/data/deletns.dat
path: ./data/deletns.dat


output: # Directory path to output directory
Expand Down

0 comments on commit 15c1510

Please sign in to comment.