A server site support for ClassificationApp.
In order to run the back-end service, a Geopedia or equivalent database with
tables as defined in schemas.py
needs to be created. Get in touch if you are interested in
reproducing the results using Geopedia.
A valid Sentinel Hub instance ID is required to retrieve Sentinel imagery. The instance ID
need be added to the data/input_sources.json
file.
There are multiple ways how to run the service:
(Required: Python >= 3.5)
- Clone git repository, move to the main project folder and install the project as a normal Python package. The following will install it in editable mode:
pip install -e . --upgrade
(On Windows some dependency packages might raise an error during installation. Install them from wheels repo.)
- Start running the service with:
python main.py
(Required: Python >= 3.5)
- Clone git repository, move to the main project folder and install packages:
pipenv install
- Enter virtual environment:
pipenv shell
- Start the service:
python main.py
(Required: docker)
- Clone git repository, move to the main project folder and create a docker image:
docker build . --tag=class-service
- Run the image in a container:
docker run -p 5000:80 class-service
(The service will be available at port 5000)
The running service will produce a swagger documentation at /docs
(e.g locally that is 'http://127.0.0.1:5000/docs').
For more details check ./classification-service/service.py
. There you will also see example calls with curl
.