Skip to content

fastscape-lem/fastscape-demo

Repository files navigation

Binder Test notebooks

FastScape Demo

This repository contains a collection of Jupyter notebooks with examples of using the Fastscape software stack for landscape evolution modeling and topographic analysis.

More information on this website: https://fastscape.org

How to run the notebooks?

Run in the cloud (Binder)

You can run the notebooks in your browser without installing anything thanks to binder. Just follow the link below or click on the "launch binder" badge above and it will launch remotely a new notebook server for you:

This service is for demo purpose only, do not rely on it for doing more serious work.

Install and run locally (Docker)

Docker images are built automatically for this repository. Those images provide the whole computing environment, pre-installed and pre-configured for running the notebooks. The only requirement is to have Docker installed on your machine. It is available on all platforms Linux/Windows/Mac and it can be installed from the Docker website or using one of your platform's package managers.

Run the command below to first pull the latest image:

$ docker pull fastscape/fastscape-demo:latest

Then run the command below to start the Jupyterlab application from the Docker container (replace test-fastscape by any other name you want to give to your local container):

$ docker run -it --name test-fastscape -p 8888:8888 fastscape/fastscape-demo jupyter lab --ip 0.0.0.0

You can then enter in your browser the url and token provided to start using the application.

Check Docker's documentation for additional run options, e.g., if you want to use the Jupyterlab application with notebooks or files on your local filesystem (i.e., not in the container).

When you are done you need to stop (and optionally remove) the container:

$ docker stop test-fastscape
$ docker rm test-fastscape

Install and run locally (Conda)

Assuming that you have git and conda installed, you can install all the packages required to run the notebooks in a new conda environment using the following commands:

$ git clone https://github.com/fastscape-lem/fastscape-demo
$ cd fastscape-demo
$ conda env create -f environment.yml
$ conda activate fastscape-demo

Then run the command below to start the Jupyterlab application. It should open a new tab in your browser.

$ jupyter lab

How to contribute?

Your contribution is welcome! Your can do so by reporting issues, suggesting new notebook examples or improvements to the current examples.

A few extra steps are required to prepare your contributions. You can first update the conda environment using the following command:

$ conda env update -n fastscape-demo --file environment-dev.yml 

This installs a few additional packages like pre-commit, which is used to ensure that all notebook cell outputs are cleared before adding or updating notebooks in this git repository. Run the command below to enable pre-commit (you only need to do this once):

$ pre-commit install

The script below is useful if you want to ensure that all notebooks are running without error:

$ python execute_all_notebooks.py

This script (as well as a script to build the Docker image) is run each time you open or update a pull-request on GitHub.

About

A collection of Jupyter notebooks as examples of usage of the Fastscape software stack.

Topics

Resources

License

Stars

Watchers

Forks