There are two streamlits apps are running in my server, when the apps are deployed in Ubuntu VM server, we execute the following command
$ nohup streamlit run dashboard1.py >data.out 2>&1 &
$ nohup streamlit run dashboard2.py >data.out 2>&1 &
it creates the processes like
adminr@micro:~/$ ps -e | grep streamlit
132803 pts/0 00:00:10 streamlit
156959 pts/0 00:00:02 streamlit
can we change the process name from streamlit to custom name like “dashboard_sale” and “dashboard_college”. This would be easy for manage and redeploy.
Please help
I tired alreay python setproctitle package but it is not working
import streamlit as st
import setproctitle # installed pip install setproctitle
# Set the process title
setproctitle.setproctitle("dashboard_sale")
# Streamlit app content
def main():
st.title("Streamlit App with Process Title")
st.write("This is a simple Streamlit app that sets the process title.")
if __name__ == "__main__":
main()
packages requiered for running this code
pip install streamlit setproctitle