Skip to content

Setup

Install

If you wish, create a virtual environment for streamlit. Navigate to the Streamlit directory:

cd ~/steeleagle/gcs/streamlit/
python3 -m venv .

Install the requirements:

python3 -m pip install -r requirements.txt

Configure

Next, navigate to the .streamlit directory:

cd .streamlit

Create the secrets.toml config file from the template:

cp secrets.toml.template secrets.toml

Open the secrets.toml file in your favorite editor and fill out the fields according to the instructions:

# The Redis database IP address. This can be 0.0.0.0 if Redis is running on
# the same host
redis = "<server>"
redis_port = 6379
redis_user = "steeleagle"
# The Redis password you specified in redis.conf
redis_pw = "<generate with>"
# Specify as 0.0.0.0:8080 in most cases
webserver = "<server>:8080"
# Specify as 0.0.0.0:1984 in most cases
webrtc = "<server>:1984"
# Specify as 0.0.0.0 in most cases
zmq = "<server>"
zmq_port = 6001
# Choose and enter a password to use for streamlit
password = "<secure password>"
scripts_path = "<path to steeleagle-vol scripts dir i.e. /home/ubuntu/steeleagle/backend/server/steeleagle-vol/scripts/>"
geofence_path = "<path to steeleagle-vol geofence file i.e. /home/ubuntu/steeleagle/backend/server/geofence/geofence.kml>"
waypoints = "<path to compiler's waypoints file i.e. /home/ubuntu/steeleagle/backend/server/steeleagle-vol/compiler/out/waypoint.json>"

Optionally, you can configure the theme for Streamlit by editing config.toml:

...
[theme]
base = "dark"
primaryColor="#1B9AAA"
backgroundColor="#050505"
secondaryBackgroundColor="#333333"
textColor="#F5F1E3"
font="Source Sans Pro"

Launch

Launch the overview page using Streamlit:

PYTHONPATH=../../:../../protocol/ streamlit run overview.py

NOTE: Prepending the PYTHON_PATH is necessary so that Streamlit can find the SteelEagle protocol generated by Google protoc.