https://github.com/drift-labs/v2-risk-dashboard
risk analytics for drift v2
https://github.com/drift-labs/v2-risk-dashboard
Last synced: 22 days ago
JSON representation
risk analytics for drift v2
- Host: GitHub
- URL: https://github.com/drift-labs/v2-risk-dashboard
- Owner: drift-labs
- Created: 2024-06-13T16:26:59.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-04-29T21:39:10.000Z (22 days ago)
- Last Synced: 2025-04-30T03:49:42.178Z (22 days ago)
- Language: Python
- Homepage:
- Size: 56 MB
- Stars: 2
- Watchers: 5
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Drift v2 Risk Dashboard
## Setup
First, make an env, activate it and pip install the dependencies:
```bash
pip install -r requirements.txt
```You can run locally in multiple terminals like so:
```bash
# Start the backend
gunicorn backend.app:app -c gunicorn_config.py
```In a different terminal, run the frontend with:
```bash
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:
```bash
./gen.sh
```Instead of all the above you can also run it in docker with:
```bash
docker compose up --build
```which will start a process to generate the cache files and then start the backend and frontend.
## Deployment
Pushing should automatically build the docker images and deploy to our k8s cluster.