The SAMGEO API is an API service designed to facilitate interactions with SAM2 module. This service allows you to interact with SAM functionalities through simple API requests. Learn more at SAMGEO.
To build and run the SAMGEO service container with GPU support, follow these steps:
-
Build the Docker container:
docker build -t samgeo-service .
-
Run the container with GPU support:
docker run -d --gpus all --env-file .env.example -v $(pwd)/app:/app -p 80:80 samgeo-service
- The container is started in detached mode (
-d
). - GPU support is enabled using
--gpus all
. - Environment variables are loaded from the
.env.example
file. - The application code is mounted from your current directory (
$(pwd)/app
) to the/app
directory in the container. - The API is exposed on port 80 (
-p 80:80
).
- The container is started in detached mode (
Note: The above steps are used for development mode. In case you are running in production, it is highly recommended to use Kubernetes. For more details, refer to ds-k8s-gpu.
This project is based on the Segment Anything Services repository from Development Seed.
There are currently two user interfaces/frontends that support the API:
- Web Interface: ds-annotate - https://developmentseed.org/ds-annotate
- JOSM Plugin: JosmMagicWand