-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduces size of the README and creates a mkdocs documentation website. Pulls changes from the wiki. After this change the wiki will not be used. To install and serve docs: ``` pip install .[docs] mkdocs serve ``` Fixes #65 Co-authored-by: Elizabeth Campolongo <[email protected]> Co-authored-by: Matt Thompson <[email protected]> Co-authored-by: Hilmar Lapp <[email protected]>
- Loading branch information
1 parent
b3ac523
commit 76b5806
Showing
14 changed files
with
720 additions
and
279 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,33 @@ | ||
name: Deploy MkDocs to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[docs]' | ||
- name: Build MkDocs site | ||
run: | | ||
mkdocs build | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site |
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,7 @@ | ||
# Acknowledgments | ||
|
||
The Imageomics Institute is supported by the National Science Foundation under Award No. 2118240 __"HDR Institute: Imageomics: A New Frontier of Biological Information Powered by Knowledge-Guided Machine Learning." Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. | ||
|
||
--- | ||
|
||
The [prediction code in this repo](src/bioclip/predict.py) is based on work by [@samuelstevens](https://github.com/samuelstevens) in [bioclip-demo](https://huggingface.co/spaces/imageomics/bioclip-demo/tree/ef075807a55687b320427196ac1662b9383f988f). |
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,49 @@ | ||
# Apptainer Container | ||
[Apptainer/Singularity](https://apptainer.org/docs/user/main/index.html) images for pybioclip are provided at [ghcr.io/Imageomics/pybioclip-sif registry](https://github.com/Imageomics/pybioclip/pkgs/container/pybioclip-sif). | ||
|
||
_NOTE: It is also possible to download the [pybioclip docker container](docker.md) and convert that into a singularity container, but that process can take quite a while._ | ||
|
||
## Tutorial | ||
|
||
### Download example images | ||
Download two images from the [bioclip-demo](https://huggingface.co/spaces/imageomics/bioclip-demo). | ||
|
||
```console | ||
wget https://huggingface.co/spaces/imageomics/bioclip-demo/resolve/main/examples/Ursus-arctos.jpeg | ||
wget https://huggingface.co/spaces/imageomics/bioclip-demo/resolve/main/examples/Felis-catus.jpeg | ||
``` | ||
|
||
### Download a pybioclip container | ||
|
||
```console | ||
apptainer pull oras://ghcr.io/imageomics/pybioclip-sif:1.0.0 | ||
``` | ||
The above command will create a `pybioclip_1.0.0.sif` container image file. | ||
|
||
### Create predictions using a CPU | ||
```console | ||
./pybioclip_sif_1.0.0.sif bioclip predict Ursus-arctos.jpeg Felis-catus.jpeg | ||
``` | ||
|
||
### Create predictions using a GPU | ||
This step requires a cuda GPU. | ||
|
||
```console | ||
apptainer exec -nv ./pybioclip_sif_1.0.0.sif bioclip predict --device cuda Ursus-arctos.jpeg Felis-catus.jpeg | ||
``` | ||
|
||
### Create predictions using a GPU via a Slurm Job | ||
This step requires being on a [Slurm cluster](https://slurm.schedmd.com/documentation.html). | ||
|
||
Create a Slurm sbatch script named `bioclip.sh` with the following content: | ||
``` | ||
#!/bin/bash | ||
#SBATCH --nodes=1 | ||
#SBATCH --time=00:10:00 | ||
#SBATCH --gpus-per-node=1 | ||
apptainer exec --nv ./pybioclip_sif_1.0.0.sif bioclip predict --device cuda $* | ||
``` | ||
Run the slurm job filling in your Slurm account: | ||
```console | ||
sbatch --account <SLURMACCT> bioclip.sh Ursus-arctos.jpeg Felis-catus.jpeg | ||
``` |
Oops, something went wrong.