Skip to content

UTDisaster/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend

Setup

Recommended to use uv to manage virtual environment and pip packages.

First Installation

Create virtual environment:

uv venv

Install dependencies:

uv pip install -r requirements.txt

PostgreSQL + PostGIS

Note: The following names and passwords are only for development purposes, and will be different in production.

Create a PostgreSQL database with PostGIS enabled, then set:

docker run --name utd-postgis \
    -e POSTGRES_USER=utd \
    -e POSTGRES_PASSWORD=utdpass \
    -e POSTGRES_DB=utd_data \
    -p 5432:5432 \
    -d postgis/postgis:16-3.4

If this not the first time running, use now:

docker start utd-postgis

Make sure your environment has the variable DATABASE_URL which corresponds to the new DB.

export DATABASE_URL='postgresql+psycopg://utd:utdpass@localhost:5432/utd_data'

Preprocessing Pipeline

Run both parsing and DB loading in one command:

python3 util/preprocess-data.py ../test_images_labels_targets/test --output data-example

Running the API

If parsed images are not under data-example, point the API to the parser output root:

export PARSED_DATA_DIR='data-example'
uvicorn app.main:app --reload

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages