First, make an env, activate it and pip install the dependencies:
pip install -r requirements.txtYou can run locally in multiple terminals like so:
# Start the backend
gunicorn backend.app:app -c gunicorn_config.pyIn a different terminal, run the frontend with:
streamlit run src/main.pyTwo 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.shInstead of all the above you can also run it in docker with:
docker compose up --buildwhich 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.