Version/Environment (if relevant):
All versions. Requires a Compute Environment with Streamlit installed. Domino Standard Environments are recommended.How To:
Step 1 — Install Streamlit
If you are using a Domino Standard Environment, add the Streamlit package to your Compute Environment via one of the following methods: Dockerfile instruction:streamlit starlette
Note: Some older versions of streamlit and starlette have compatibility issues, make sure you are using the latest versions.
Step 2 — Build your Streamlit app
Create your Streamlit app file (e.g.streamlit_app.py) in your project’s /mnt directory. The example below is a working demo adapted from Streamlit’s NYC Uber Ridesharing demo (updated for Streamlit 1.3.8):
Step 3 — Live test from a workspace
JupyterLab
You can live test your Streamlit app from a JupyterLab workspace using Jupyter Server Proxy. Ensure that JupyterLab and jupyter-server-proxy are installed in your Compute Environment. Both are pre-installed in Domino Standard Environments.- Launch a JupyterLab workspace and open a new terminal.
-
Run your app from the
/mntdirectory: -
Access the app in your browser using the following URL pattern (default Streamlit port is
8501):
/ at the end of the URL is required. Omitting it will prevent the app from loading. The <run-id> can be found in the URL of the active workspace session.
VSCode
Use the same process to start the app as above, but for live testing from a VSCode workspace, the URL structure differs — insert/r/ before notebookSession:
ex.
https://<your-domino-url>/<username>/<project-name>/r/notebookSession/<run-id>/proxy/8501/
Step 4 — Publish the app in Domino
Once development is complete, publish the app using anapp.sh file. Create app.sh in the root of your project with the following contents:
- Navigate to Deployment > Apps & Agents in your project.
- Click Publish and select App
- Complete the form and click Publish Domino App.
- Once the App is running, click View App to open it.
- See: Live testing Streamlit in Domino on VSCode workspace (KB 000001036).
- For full Domino App publishing documentation, see: Publish Apps — Domino Docs.