Tadeo
09/24/2021, 1:27 PMYannick
protobuf
version is installed in the environment, thereby breaking streamlit
. To fix this you can add pip install --upgrade protobuf
to the environment (the one in which you installed streamlit
and plotly
).
Second, because you are not using the template streamlit service that we offer, there are a few changes you need to make to its configuration.
1. Again go to Services > Edit Services > Streamlit
2. Replace the image by your custom environment (you did this correct!)
3. Change the "Command (optional)" to: -c 'umask 002 && streamlit run /project-dir/streamlit.py'
4. Add a file called streamlit.py
in your project directory. You can do this through the JupyterLab UI.
5. Restart the session for the changes to take effect.
6. You should now be able to visit your streamlit dashboard.
Example `streamlit.py`:
import streamlit as st
st.title("Hello Streamlit")
Rick Lamers
Tadeo
09/24/2021, 7:30 PMYannick
Tadeo
09/25/2021, 2:15 PMYannick
/project-dir
Now you should be able to change the streamlit.py
and see the changes on reload of the streamlit app.
The steps above mount your project directory files to the service container. This you are editing the same streamlit.py
file (through JupyterLab) as the one that is present in the custom streamlit service.Tadeo
09/26/2021, 10:43 PM