-
Notifications
You must be signed in to change notification settings - Fork 5
test geo engine against actual instance in unit tests #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
7fe0ca6
test geo engine against actual instance in unit tests
ChristianBeilschmidt 1587ebd
checkout dirs
ChristianBeilschmidt 5b211b7
old union syntax
ChristianBeilschmidt 6066e9f
lint ignore
ChristianBeilschmidt b19e842
env
ChristianBeilschmidt 78829f7
workspace
ChristianBeilschmidt 48075c1
ci
ChristianBeilschmidt e21eeff
ci
ChristianBeilschmidt e0ef1f9
bins
ChristianBeilschmidt efeac79
bins
ChristianBeilschmidt 5290a46
coveralls debug
ChristianBeilschmidt 33a9465
lcov
ChristianBeilschmidt 0022e5d
build binaries in ge_test
ChristianBeilschmidt da82493
linter
ChristianBeilschmidt c4661dd
ci
ChristianBeilschmidt 94bf9a0
wms test
ChristianBeilschmidt c858d4b
linter
ChristianBeilschmidt cf13963
repo hash
ChristianBeilschmidt 24d6155
test examples
ChristianBeilschmidt e74c740
update cartopy
ChristianBeilschmidt 99f0bc8
clean schema
ChristianBeilschmidt 72a62ff
,.
ChristianBeilschmidt 5ab1ab4
Merge branch 'main' of github.com:geo-engine/geoengine-python into ge…
ChristianBeilschmidt 0c3bc11
venv
ChristianBeilschmidt 73a5249
dataset fix
ChristianBeilschmidt 55e1146
blacklist data usage notebook
ChristianBeilschmidt 3cf1c57
uv
ChristianBeilschmidt c1e85cd
interactive ml container
ChristianBeilschmidt a0041b8
Merge pull request #212 from geo-engine/docker-ml-app
jdroenner 9fe1c44
log building the GE
ChristianBeilschmidt 30073a4
move git ref
ChristianBeilschmidt cae34af
os / sys fix
ChristianBeilschmidt 1a1c96d
live logs
ChristianBeilschmidt 609e03d
release mode
ChristianBeilschmidt 4621e99
release
ChristianBeilschmidt 3e1205b
set log spec for testing
ChristianBeilschmidt 2ff8af1
Merge branch 'main' of github.com:geo-engine/geoengine-python into ge…
ChristianBeilschmidt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| main | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,37 @@ | ||
| # Setup a Debian 12 based image with a Python virtualenv | ||
| FROM debian:12-slim AS build | ||
| RUN apt-get update && \ | ||
| apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev && \ | ||
| python3 -m venv /venv && \ | ||
| /venv/bin/pip install --upgrade pip setuptools wheel | ||
|
|
||
| # Install Geo Engine library and its dependencies | ||
| FROM build AS build-venv | ||
| COPY pyproject.toml setup.cfg setup.py /library/ | ||
| COPY geoengine /library/geoengine | ||
| WORKDIR /library | ||
| RUN /venv/bin/pip install --disable-pip-version-check .[dev,test,examples] | ||
|
|
||
| # Copy the virtualenv into a distroless image | ||
| # Hint: Use the `:debug` tag to get a shell in the image | ||
| FROM gcr.io/distroless/python3-debian12 | ||
| COPY --from=build-venv /venv /venv | ||
|
|
||
| # Copy the example notebook to run | ||
| COPY examples/interactive_ml /app | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| ENV GEOENGINE_INSTANCE_URL=https://zentrale.app.geoengine.io/api | ||
| ENV GEOENGINE_SESSION_TOKEN=<SESSION_TOKEN> | ||
|
|
||
| EXPOSE 8866 | ||
|
|
||
| ENTRYPOINT [ \ | ||
| "/venv/bin/python3", \ | ||
| "-m", \ | ||
| "voila", \ | ||
| "--no-browser", \ | ||
| "--Voila.ip='0.0.0.0'", \ | ||
| "app/Simple Random Forest Two-Class Classifier on Sentinel-2 Images.ipynb" \ | ||
| ] |
This file contains hidden or 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,42 @@ | ||
| # Interactive ML App | ||
michaelmattig marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| This app demonstrates a complete workflow for binary classification using Sentinel-2 satellite imagery and a Random Forest classifier. The workflow includes data acquisition, preprocessing, model training, and result visualization. Initially, the environment is set up and necessary libraries are imported. The spatial and temporal bounds for the data query are then defined through a query rectangle. A workflow is created to fetch and preprocess Sentinel-2 data, which is followed by the use of a labeling tool to create training data for water and non-water classes. | ||
|
|
||
| ## Local setup | ||
|
|
||
| To run the app locally, you need to install the dependencies and start the app. You can install the dependencies with: | ||
|
|
||
| ```bash | ||
| pip install --disable-pip-version-check -e .[dev,test,examples] | ||
|
|
||
| GEOENGINE_INSTANCE_URL=https://zentrale.app.geoengine.io/api \ | ||
| GEOENGINE_SESSION_TOKEN=<SESSION_TOKEN> \ | ||
| ./examples/interactive_ml/app/app.sh | ||
| ``` | ||
|
|
||
| The app will be available at [http://localhost:8866](http://localhost:8866). | ||
|
|
||
| ## Container setup | ||
|
|
||
| To run the app in a container, you need to build the container image and start the container. | ||
| You can build the container image with: | ||
|
|
||
| ```bash | ||
| ./examples/interactive_ml/app/build.sh | ||
|
|
||
| podman run --rm \ | ||
| -p 8866:8866 \ | ||
| -e GEOENGINE_INSTANCE_URL=https://zentrale.app.geoengine.io/api \ | ||
| -e GEOENGINE_SESSION_TOKEN=<SESSION_TOKEN> \ | ||
| geoengine-interactive-ml:latest | ||
| ``` | ||
|
|
||
| ### Upload to quay.io | ||
|
|
||
| To upload the container image to quay.io, you need to log in and push the image. | ||
| You can do this with: | ||
|
|
||
| ```bash | ||
| podman login quay.io | ||
| podman push geoengine-interactive-ml:latest quay.io/geoengine/geoengine-interactive-ml:latest | ||
| ``` | ||
This file contains hidden or 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
Binary file not shown.
This file contains hidden or 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,5 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
|
||
| podman build -f $SCRIPT_DIR/Dockerfile --tag geoengine-interactive-ml:latest . |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.