-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
165 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: main | ||
|
||
name: Quarto Publish | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Render and Publish | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
with: | ||
target: gh-pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
project: | ||
type: website | ||
output-dir: docs | ||
execute: | ||
freeze: auto | ||
|
||
website: | ||
sidebar: | ||
style: "docked" | ||
search: true | ||
contents: | ||
- file: index.qmd | ||
icon: house | ||
text: About | ||
- text: JuypterHub | ||
icon: pc-display-horizontal | ||
href: https://openscapes.2i2c.cloud/ | ||
- icon: book | ||
text: Catalog | ||
href: https://radiantearth.github.io/stac-browser/#/external/raw.githubusercontent.com/schmidtDSE/biodiversity-catalog/main/stac/v1/catalog.json?.language=en | ||
- icon: github | ||
text: GitHub repo | ||
href: https://github.com/boettiger-lab/nasa-topst-env-justice | ||
- icon: globe-americas | ||
text: Author Homepage | ||
href: https://carlboettiger.info | ||
- section: Examples | ||
contents: | ||
- text: Computing Environments | ||
href: contents/computing-environment.qmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
title: "Computing Environments" | ||
format: html | ||
--- | ||
|
||
|
||
# Portable Reproducibility :onion: | ||
|
||
Noam Ross says that good reproducibility is like an onion :onion: -- it comes | ||
in many layers. There's a purpose to containerized environments deployed on | ||
cloud-hosted virtual machines. And we believe students should be able to leverage | ||
those things, easily and rapidly deploying cloud-hosted images, and will get | ||
to that here. But reproducibility doesn't often involve reconstructing many GB | ||
virtual computing environments from scratch. Most of the time, we just want | ||
to copy-paste a few lines of code and expect it to work. Many layers lie between | ||
these two extremes -- from package dependencies and system dependencies to | ||
containers, orchestration, metadata, even hardware requirements. | ||
|
||
In many cases, it should be sufficient to copy-paste code from the examples shown | ||
here into your preferred computational environment -- it's okay to grab just what | ||
you need, you don't have to take the whole onion. But it is also our goal to make | ||
it as easy as possible to grab the whole onion and take it where you want it -- | ||
be that a local VSCode editor on your laptop, or an RStudio Server instance | ||
running up on Microsoft Azure cloud. | ||
|
||
## On the cloud: Codespaces | ||
|
||
By clicking the "open in codespaces" button on the README in GitHub, users | ||
will be placed into a free cloud-based virtual machine running a VSCode editor | ||
in their web browser. | ||
This includes specific versions of R and python packages, the | ||
latest releases of the OSGeo C libraries GDAL, PROJ, and GEOS that power | ||
many spatial operations in both languages. These elements are pre-compiled | ||
in a Docker container based on the latest Ubuntu LTS release (22.04 at | ||
the time of writing), which itself is build according to the [Dockerfile](https://github.com/boettiger-lab/nasa-topst-env-justice/blob/main/.devcontainer/Dockerfile) | ||
found in this repository using [a GitHub Action](https://github.com/boettiger-lab/nasa-topst-env-justice/actions/workflows/docker-image.yml). | ||
The [devcontainer.json configuration](https://github.com/boettiger-lab/nasa-topst-env-justice/blob/main/.devcontainer/devcontainer.json) will also set | ||
up relevant VSCode extensions for working with python and R, including | ||
interactivity for both Jupyter and Quarto notebooks. Additionally, it will | ||
provide access to an RStudio Server environment on an embedded port for users | ||
who prefer that editor to VSCode. | ||
|
||
## Locally: VSCode | ||
|
||
Open this repository in a local [Visual Studio Code editor](https://code.visualstudio.com/) on a Mac, Linux, or Windows | ||
laptop and you will probably be prompted "Do you want to open this in project | ||
in a Dev Container?" If you agree, VSCode will attempt to use a local Docker | ||
installation to pull a container with much of the required software already | ||
installed. This uses the same Docker container and enables all the same | ||
extensions in VSCode, including RStudio server on the embedded port. | ||
|
||
Of course, users can open this project in a local VSCode or any other favorite editor | ||
without opening in the devcontainer. The user assumes responsibility to install necessary software, | ||
i.e. the packages listed in `requirements.txt` or `install.R`. Note that | ||
doing so does not ensure that the same version of system libraries like GDAL, | ||
PROJ, or GEOS will necessarily be used. For most operations this should | ||
not matter, but users on older versions of GDAL may encounter | ||
worse performance or other difficulties. | ||
|
||
## Anywhere: Docker | ||
|
||
We can sidesteps elements specific to the VSCode editor defined in the | ||
[`devcontainer.json` configuration](https://github.com/boettiger-lab/nasa-topst-env-justice/blob/main/.devcontainer/devcontainer.json) | ||
while still leveraging the same system libraries and pre-built packages. | ||
For example, a user could also choose to run (or extend) | ||
the underlying docker container independently, e.g. | ||
|
||
```bash | ||
docker run --rm -ti ghcr.io/boettiger-lab/nasa-tops:latest bash | ||
``` | ||
|
||
which opens a bash terminal inside the container. This approach is also | ||
compatible with most HPC setups using [singularity](https://rocker-project.org/use/singularity.html) instead of docker. | ||
|
||
Some users may not be familiar with editing and running code entirely from a bash shell, so the container also includes RStudio server and thus can be run to launch RStudio in an open port instead, | ||
|
||
```bash | ||
docker run -d -p 8787:8787 --user root -e DISABLE_AUTH=true \ | ||
ghcr.io/boettiger-lab/nasa-tops:latest | ||
``` | ||
|
||
and visit `http://localhost:8787` to connect. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: "NASA TOPS-T Module" | ||
format: html | ||
--- | ||
|
||
|
||
<img align="right" src="https://zenodo.org/record/7742997/files/Tops_Badge_Nasa.png" width="150" alt="Transform to Open Science Logo that shows a top as a rocket taking off and the text Transform to Open Science in the white vapor plume around the launch site"> | ||
|
||
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) | ||
[![Docker Image :whale2:](https://github.com/boettiger-lab/nasa-topst-env-justice/actions/workflows/docker-image.yml/badge.svg)](https://github.com/boettiger-lab/nasa-topst-env-justice/actions/workflows/docker-image.yml) | ||
|
||
|
||
--- | ||
|
||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/espm-157/nasa-topst-env-justice?quickstart=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "Introduction: R" | ||
format: html | ||
--- | ||
|
||
|