Skip to content

feat: adopt native uv support for Databricks Apps#70

Open
dgokeeffe wants to merge 4 commits intodatasciencemonkey:mainfrom
dgokeeffe:pr/native-uv-support
Open

feat: adopt native uv support for Databricks Apps#70
dgokeeffe wants to merge 4 commits intodatasciencemonkey:mainfrom
dgokeeffe:pr/native-uv-support

Conversation

@dgokeeffe
Copy link
Copy Markdown
Contributor

Summary

  • Replaces pip/requirements.txt with native uv package management (pyproject.toml + uv.lock)
  • Updates app.yaml command to use uv run gunicorn
  • Removes DATABRICKS_GATEWAY_HOST from app.yaml (falls back to direct model serving)
  • Fixes post-commit workspace sync hook to use uv run
  • Databricks Apps now has native uv support — no more pip install step

Test plan

  • Verify app starts correctly with uv run gunicorn app:app
  • Confirm uv.lock resolves all dependencies correctly
  • Test workspace sync hook fires correctly on git commit
  • Verify model serving works without DATABRICKS_GATEWAY_HOST

This pull request was AI-assisted by Isaac.

- Switch to uv run gunicorn in app.yaml (10-100x faster installs)
- Delete requirements.txt, use pyproject.toml + uv.lock exclusively
- Require Python >=3.12, add missing deps (gunicorn, flask-socketio)
- Run setup scripts via uv run python for consistent Python 3.12 env
- Strip DATABRICKS_TOKEN whitespace at startup to fix auth failures
- Add ~/.local/bin to PATH in _run_step for uv/tool discovery

Co-authored-by: Isaac
Falls back to direct model serving when no AI Gateway is configured.

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant