First, make an env, activate it and pip install the dependencies:
pip install -r requirements.txt
You can run locally in multiple terminals like so:
# Start the backend
gunicorn backend.app:app -c gunicorn_config.py
In a different terminal, run the frontend with:
streamlit run src/main.py
Two endpoints, asset liabilities
and price shock
are CPU heavy and so are generated in a separate process
(instead of on request) and cached, the backend will serve these cached files.
In a different terminal, you can generate the cache files with:
./gen.sh
Instead of all the above you can also run it in docker with:
docker compose up --build
which will start a process to generate the cache files and then start the backend and frontend.
Pushing should automatically build the docker images and deploy to our k8s cluster.