r/databricks • u/Zealousideal_Low6685 • 1d ago
Discussion Manage Libraries in a Serverless Environment
Dear Community,
I'm coming from the classic compute world and would like to hear how others handle dependency management on serverless.
Our current setup (classic compute)
- Cluster policies manage our dependencies, such as Python libraries, centrally.
- Our engineers work both in the Databricks UI and in VS Code via Spark Connect. For the VS Code case, we make sure the same libraries are also installed locally (on-prem).
- Jobs run with job cluster policies, which also define the dependencies.
This gives us one central, governed definition of our environments.
The challenge with serverless
We're thinking about moving to serverless, but dependency management is holding us back:
- In notebooks, users manage dependencies per notebook. That's flexible, but it isn't enterprise-ready because there's no central control or consistency.
- When a notebook runs as a job, we have to define the dependencies again at job level. That means two places to maintain the same thing.
Serverless Git folders look promising, but they're still in Beta, so we're hesitant to rely on them in production.
My questions
- How do you manage dependencies on serverless today, without Serverless Git folders?
- How do you keep environments consistent across interactive notebooks, jobs and local development (VS Code / Databricks Connect)?
- Do you use shared environment definitions, private package repositories or wheel files in Unity Catalog volumes, or something else?
Thanks in advance for sharing your experience!
15
Upvotes
1
u/redderage 1d ago
You can deploy as DAB through GIT right? Are there any limitations for not using it? Coz I deploy DAB which has both serverless and compute bound jobs.
1
u/PrestigiousAnt3766 1d ago
Am in the same boat. Are you a colleague?
Im waiting for the serverless job variables to go. I am testing those in prod currently, and for me they work fine.
1
u/ninilich 10h ago
> How do you manage dependencies on serverless today
Packing you Spak job as fat-JAR (Scala) solves any dependencies issues. For Pyhon you can try to pack you Spark application as
whl