Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Dec 19, 2023
2 parents 58bb813 + be0e4a8 commit 149aec4
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ app_port: 8765

NOTE: The YAML header above is required for HuggingFace Spaces deployment. Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

-----

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/boettiger-lab/solara-test)


# Simple Solara demo

This respository demonstrates how we can deploy an interactive map tool from a few lines of python to an app on HuggingFace spaces using Solara.
Expand All @@ -24,4 +29,20 @@ This application accesses boundary polygons from the National Parks Service and

### Code

The required code for analysis is in `fire.py`, with solara visualization in `pages/01_leafmap.py`. (For interactive use, see `solar-app.pynb`)
The required code for analysis is in `fire.py`, with solara visualization in `pages/01_leafmap.py`. (For interactive use, see `solar-app.pynb`)

### Actions

This repository uses three GitHub Actions:

- 📦 [`docker.yml`](.github/workflows/docker.yml) builds the Dockerfile and pushes to GitHub Container Registry
- 🤗 [`sync-hf.yml`](.github/workflows/sync-hf.yml) syncs the GitHub repo to HuggingFace Spaces repo, which renders the Solara App via Dockerfile.
- 💻 [`compute.yml`](.github/workflows/compute.yml) Runs the `fire.py` script using the Docker container environment, and pushes the resulting COGs to 🤗 huggingface datasets.

### Credentials

This demo uses only free and open source resources. The only credentials required are a HuggingFace token to deploy datasets (via git-lfs) and HuggingFace Spaces (for the Solara App). This deployment could use other mechanisms instead, these options are simple and free.

### Environments

This setup tries to be simple and portable. Select "use devcontainer" when opening in a local VSCode instance, select "Open in Codespaces" from the "Code" button menu in GitHub, or use the Gipod button to access a VSCode editor running in the containerized environment. Or simply open in your favorite python editor and install the `requirements.txt` file yourself.

0 comments on commit 149aec4

Please sign in to comment.