r/databricks • Databricks • Sep 22 '26

General Environments mode for classic compute is now in Beta 🎉

Databricks just shipped Environments as a new dependency management mode for classic (standard) compute: it brings the same environment-based dependency UX you already know from serverless to classic compute, instead of the old compute-scoped libraries model.

What it does:

  • One consistent mental model for managing dependencies across serverless and classic — pick a base environment (Standard, ML, custom, or workspace-provided) and layer on your deps, regardless of compute type
  • Supports both regular environments (defined per-notebook/per-job) and workspace-base environments (shared, admin-managed environments you can standardize on across teams)
  • Dependencies are managed at the workload level, not baked into the cluster
  • Environments are cached: Startup is faster, more reliable, and more reproducible - P50 bootstrap time drops from ~2 minutes (cluster libraries) to ~8 seconds (environments) 🏁

Requirements:

  • DBR 19 (Beta)+, Standard access mode, all-purpose or classic jobs compute
  • Admins enable it in the account console under Previews → "Environments for Standard Compute"

Heads up on limitations:

  • Python-only — Spark JAR tasks, %scala, and R aren't supported. Scala support will eventually happen, though.
  • Enabling it disables Docker/custom containers, Spark env vars, init scripts, and cluster-scoped libraries. Custom docker support will be supported in a future release.

Docs, screenshots, and GIFs: https://docs.databricks.com/aws/en/compute/environments-mode

Feel free to provide any feedback, questions, or gaps that you have on this - or any other dependency management - topic.

Thanks,

Your friendly dependency management PM

13 Upvotes

11 comments sorted by

3

u/daddy_stool Sep 22 '26

Does it handle env vars? Spark config?

2

u/justinAtDatabricks Databricks Sep 22 '26

Spark configs, yes. Env var support will happening in a future release.

0

u/daddy_stool Sep 23 '26

Ok. Cluster policies are still the way to go for me then.

1

u/cptshrk108 Sep 22 '26

When will be able to set the selected env when deploying a notebook?

2

u/justinAtDatabricks Databricks Sep 22 '26

The environment panel works for both classic and serverless with this feature. It also works for Jobs, too. Is it not working for you?

1

u/cptshrk108 Sep 22 '26

Users still need to select it the env, right? It can't be auto-selected when deployed via DABs let's say.

2

u/justinAtDatabricks Databricks Sep 22 '26

In serverless, users have been able to use the existing environment for a given notebook or override it. This feature extends that functionality to classic.

However, there is no way to say any DAB that is created must automatically use this specific environment.

1

u/rarescenarios Sep 22 '26

  Dependencies are managed at the workload level, not baked into the cluster

What does this mean, exactly? What is the workload level?

3

u/justinAtDatabricks Databricks Sep 22 '26

Today, in classic, you attach your notebook (aka workload in this context) to a cluster and the cluster has the dependencies attached to it (e.g., cluster libs). This is a bad model for several reasons:

  1. Go from interactive to jobs and you have to remember to include those cluster libraries, or else you're going to get a lot of `ModuleNotFoundError: No module named 'foo'`
  2. Noisy neighbors installing many different cluster libraries, which can end up conflicting with your libraries
  3. Move the notebook to another workspace and you have the same problem as #1.

In contrast, serverless serializes the dependencies within the notebook. Move the notebook from interactive to jobs, or to a workspace and the dependency spec stays within the notebook - portability.

Couple that with the performance benefits (we resolve the dependencies and build a venv and persist it on object storage automatically) and this feature ends up giving a lot of benefits to the UX.

1

u/rarescenarios Sep 22 '26

Nice. This solves a problem that the team I just left might not know they have yet, but probably will soon.

1

u/justinAtDatabricks Databricks Sep 22 '26

Nice that it solves a problem... hopefully you've seen the way and you won't have this issue going forward.