| License |
|
| TerraStackAI |
|
| Built With |
|
| Deployment |
|
The Geospatial Exploration and Orchestration Studio (GEOStudio) is an integrated platform for fine-tuning, inference, and orchestration of geospatial AI models. It combines a no-code UI, low-code SDK, and APIs to make working with geospatial data and AI accessible to everyone, from researchers to developers.
GEOStudio Core provides the unified API platform that orchestrates the entire geospatial machine learning workflow β from dataset onboarding and model training to model deployment for inferencing. It's codebase provides API endpoints for three core components:
- Inference APIs for running ML model predictions on models trained on geospatial imagery.
- Dataset Factory APIs for onboarding and managing labeled training datasets.
- Fine-Tuning APIs for orchestrating Kubernetes-based model training jobs with experiment tracking.
For details on deployment of the GEOStudio to a local or managed K8 cluster, see here.
Before running GEOStudio Core locally or inside a containerized environment, ensure that all required backend services are installed, configured, and reachable. GEOStudio Core depends on both a relational database and an in-memory datastore for full functionality.
The following services must be available before the application can start:
| Service | Supported Version(s) | Purpose | Installation / Setup |
|---|---|---|---|
![]() Python |
3.11 |
Required runtime for GEOStudio Core application, tooling, and CLI scripts. |
Python Installation Guide Recommended: Use pyenv for version management. |
![]() PostgreSQL |
15.x | Primary datastore for GEOStudio core metadata. |
PostgreSQL Installation Guide Alternatively: Use a managed PostgreSQL service such as IBM Cloud Databases for PostgreSQL. |
![]() Redis |
8.x |
In-memory datastore used for:
|
Redis Installation Guide Alternatively: Use a managed Redis instance. |
To ensure the application starts successfully:
-
PostgreSQL must be running and accessible (local instance or cloud-hosted).
-
Your
.envfile must contain a validDATABASE_URLin the following format:DATABASE_URL=postgresql+psycopg://username:password@hostname:5432/database_name
-
If running Redis locally, ensure the default port
6379is reachable, or updateREDIS_URLin.env.
This project uses uv for environment management, dependency resolution, and running commands. Follow the installation instructions from the official uv docs.
After installing uv, you can proceed with these GEOStudio core setup instructions π
# Clone the repo
git clone git@github.com:terrastackai/geospatial-studio-core.git
cd geospatial-studio-core
# Install dependencies
uv sync
source .venv/bin/activate
# Make a copy of the environment variables file and replace values where necessary
cp .env.example .env
# Run migrations to setup the database
alembic upgrade head && alembic -n auth upgrade head
# Add seed data to your database.
# TODO: Convert to a task
python scripts/load_data.py
# Create user and api key
python scripts/create_user.py
# Start the server
uv run geostudio-core devVisit: http://localhost:3300/docs
Important
Developers: Make sure to enable pre-commit hooks. See the full workflow in CONTRIBUTING.md.
Make a copy of the environment variables file for docker/podman and replace values where necessary
cp .env.docker.example .env.dockerBuild and run the app using Podman:
podman build --platform linux/amd64 -t us.icr.io/gfmaas/gfmstudio-gateway --load .
podman run -p 3300:8080 --env-file .env.docker us.icr.io/gfmaas/gfmstudio-gateway:latestVisit: http://localhost:3300/docs
Make a copy of the environment variables file for docker/podman and replace values where necessary
cp .env.docker.example .env.dockerBuild and run the app using Docker:
docker build --platform linux/amd64 -t us.icr.io/gfmaas/gfmstudio-gateway --load .
docker run -p 3300:8080 --env-file .env.docker us.icr.io/gfmaas/gfmstudio-gateway:latestVisit: http://localhost:3300/docs
geospatial-model-gateway/
βββ gfmstudio/
β βββ main.py # Entry point for the app
β βββ auth/ # Authentication definitions
β βββ db_migrations/ # Alembic Database files
β β βββ seed_data/ # Seed data to setup your intial db data.
β β βββ versions/ # Alemic database schema changes
β β βββ env.py # Alembic config file to include sqlaclhemy models
β βββ fine_tuning/ # FineTuning and DatasetFactory APIs
β β βββ core/
β β βββ scripts/
β β βββ templates/
β β βββ models.py # Database models/table definition in SqlAlchemy
β β βββ schemas.py # Endpoint payload/response schema definitions
β β βββ api.py # Endpoints/Route definitions
β βββ inference/ # Inference APIs
β β βββ v2/
β β β βββ api.py # Endpoints/Route definitions
β β β βββ models.py # Database models/table definition in SqlAlchemy
β β β βββ schemas.py # Endpoint payload/response schema definitions
β β β βββ services.py
β β βββ v1/
β βββ Jira/ # JIRA Issue Endpoints
βββ tests/ # Unit and integration tests
β βββ integration/
β βββ unit/
βββ tools/ # Supporting tools and services
β βββ geoserver/ # Geoserver dockerfile
β βββ mlflow/ # Dockerfile to sync mlflow and studio
β βββ terratorch/ # Terratorch dockerfiles
β β βββ caikit-base/ # Terratorch dockerfile for caikit (used for permanently deployed inference)
β β βββ pytorch-base/ # Terratorch dockerfile for pytorch (used for run inference pipeline)
β β βββ ubi-base/ # Terratorch dockerfile for ubi (used for finetuning job)
β β βββ vllm-base/ # Terratorch dockerfile (TBA)
βββ Dockerfile
βββ docker-compose.yml # For local dev
βββ tiltfile # Tilt dev config
βββ alembic.ini # Alembic DB config
βββ requirements.txt
βββ README.md
GEOStudio Core includes a full testing toolchain based on pytest, coverage, and static analysis tooling.
These tests are executed locally and in CI/CD pipelines to maintain code quality, stability, and reliability.
To execute all unit tests:
pytest tests/This project uses pre-commit hooks to ensure code quality and consistent formatting before commits are made.
Run these commands to setup pre-commit hooks. The pre-commit hooks will automatically lint, format and check your changes for commited credentials.
pip install -r requirements-dev.txt
pre-commit installYou could also Lint your changes with:
ruff check gfmstudio/ tests/and to format with black:
# Format code
black gfmstudio/ tests/See this ReadMe for more detailed information.
We welcome contributions from the community! See the CONTRIBUTING docs for full guidelines.




