Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 1.73 KB

File metadata and controls

65 lines (51 loc) · 1.73 KB

Density Prediction API

This project provides a FastAPI-based service for density prediction using a Transformer model. Accurate density estimations of the Thermosphere are essential for all spacecraft operations in low earth orbit. Density estimation is a part of the Space Weather prediction process.

Project Structure

root/  # Repository root
│
├── docs  # Documentation. . Not in Repo!
└── libs/density_prediction  # Package root
    ├── Dockerfile
    ├── poetry.lock
    ├── pyproject.toml
    ├── README.md  # This file
    ├──  app  # FastAPI application
    ├──  logs # Log files
    ├──  scripts  # Scripts for building and running the Docker container
    └──  tests  # Unit tests

Requirements

  • Python 3.10+
  • Poetry 1.8+

Setup

  1. Clone the repository:

    git clone https://github.com/leo-gan/density_prediction
    cd <repository_directory>
  2. Install Poetry if you haven't already:

    curl -sSL https://install.python-poetry.org | python3 -
  3. Install the required packages:

    poetry install
  4. Activate the virtual environment:

    poetry shell

Configuration

Set the MODEL_PATH environment variable to point to your model file. You can also modify the default path in libs/density_prediction/app/config/settings.py.

Running the Server

To start the FastAPI server, run:

bash libs/density_prediction/scripts/start_server.sh

To stop the FastAPI server, run:

bash libs/density_prediction/scripts/stop_server.sh