requirements.txt
Who this is for:
Architecture / Concept Overview: requirements.txt
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
flowchart LR
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
DEV[Developer]:::source
CODE[App Source Code]:::ingestion
DEPLOY[Databricks Apps Deploy]:::processing
RUNTIME[Managed Container Runtime]:::storage
USERS[End Users]:::serving
DATA[Lakehouse Data & Models]:::governance
DEV --> CODE --> DEPLOY --> RUNTIME --> USERS
RUNTIME --> DATA
*Databricks Apps deploys your application code into a managed container runtime with direct access to lakehouse resources.*
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
graph TD
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
APP[Databricks App]:::source
FRAME[Frameworks]:::processing
ACCESS[Data Access]:::storage
AUTH[Authentication]:::governance
APP --> FRAME
APP --> ACCESS
APP --> AUTH
FRAME --> DASH[Dash / Plotly]:::processing
FRAME --> GRAD[Gradio]:::processing
FRAME --> STREAM[Streamlit]:::processing
FRAME --> FLASK[Flask / FastAPI]:::processing
ACCESS --> SQL_A[SQL Warehouse]:::storage
ACCESS --> MODELS[Model Serving]:::storage
ACCESS --> FILES[Unity Catalog Volumes]:::storage
AUTH --> SSO[Workspace SSO]:::governance
AUTH --> PERMS[App Permissions]:::governance
*Apps support multiple Python frameworks and access lakehouse resources through authenticated, governed connections.*
Key Terms
Prerequisites and Setup
- Databricks workspace with Apps enabled
- Databricks CLI v0.200+ installed
- Python 3.10+ for local development
- A web framework (Gradio, Dash, Streamlit, or Flask)
- Workspace permissions to create and deploy apps
Step-by-Step Implementation
Configuration Reference
| Field | Location | Description |
|---|---|---|
command | app.yml | Startup command for the application |
env | app.yml | Environment variables passed to the runtime |
resources | app.yml | Databricks resources the app needs access to |
resources[].sql_warehouse | app.yml | SQL Warehouse reference and permission level |
resources[].serving_endpoint | app.yml | Model serving endpoint reference |
| Port | Application code | Must listen on port 8080 |