Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following describes the system environment in which your Databricks app runs:
- Operating system: Ubuntu 22.04 LTS
- Python environment: Python 3.11, running in a dedicated virtual environment. All dependencies are isolated within this environment, including libraries defined in
requirements.txt
and pre-installed libraries. - Node.js environment: Node.js version 22.16 for apps developed using JavaScript frameworks. Manage dependencies using
npm
andpackage.json
. - System resources: Each app can use up to 2 virtual CPUs (vCPUs) and 6 GB of memory. If your app exceeds these limits, Azure Databricks might restart it.
View environment details
To view the environment for a specific app, including environment variables and installed packages, go to the Environment tab on the details page for the app. See View the details for a Databricks app.
Default environment variables
The following environment variables are available in every app:
Variable | Description |
---|---|
DATABRICKS_APP_NAME |
The name of the running app. |
DATABRICKS_WORKSPACE_ID |
The unique ID for the Databricks workspace the app belongs to. |
DATABRICKS_HOST |
The URL of the Databricks workspace to which the app belongs. |
DATABRICKS_APP_PORT |
The network port the app should listen on. |
DATABRICKS_CLIENT_ID |
The client ID for the Databricks service principal assigned to the app. |
DATABRICKS_CLIENT_SECRET |
The OAuth secret for the Databricks service principal assigned to the app. |
Default environment variables for Streamlit
If you use the Streamlit framework, the Databricks Apps environment pre-configures several Streamlit-specific environment variables:
Variable | Description |
---|---|
STREAMLIT_SERVER_ADDRESS |
The server address for use by Streamlit. This value is set to 0.0.0.0 and must not be overridden. |
STREAMLIT_SERVER_PORT |
The port for use by Streamlit. This value is set to DATABRICKS_APP_PORT and must not be overridden. |
STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION |
Because the Databricks Apps reverse proxy protects against Cross-Site Request Forgery (XSRF), this is set to false . |
STREAMLIT_SERVER_ENABLE_CORS |
Because the Databricks Apps reverse proxy protects against Cross-Origin Resource Sharing (CORS), This is set to false . |
STREAMLIT_SERVER_HEADLESS |
This is set to true so Streamlit runs without opening a browser window when starting. |
STREAMLIT_BROWSER_GATHER_USAGE_STATS |
This is set to false to prevent sending user stats to Streamlit. |
Pre-installed Python libraries
The following Python libraries are pre-installed in the Databricks Apps environment. You don’t need to include them in your app unless you require a different version.
Library | Version |
---|---|
databricks-sql-connector | 3.4.0 |
databricks-sdk | 0.33.0 |
mlflow-skinny | 2.16.2 |
gradio | 4.44.0 |
streamlit | 1.38.0 |
shiny | 1.1.0 |
dash | 2.18.1 |
flask | 3.0.3 |
fastapi | 0.115.0 |
uvicorn[standard] | 0.30.6 |
gunicorn | 23.0.0 |
dash-ag-grid | 31.2.0 |
dash-mantine-components | 0.14.4 |
dash-bootstrap-components | 1.6.0 |
plotly | 5.24.1 |
plotly-resampler | 0.10.0 |
No Node.js libraries are pre-installed in the Databricks Apps environment. For Node.js apps, you must explicitly list all dependencies in your package.json
file to ensure they are installed at runtime.