---
title: Configure the serverless environment
description: Learn how to manage the environment, dependencies, memory size, and serverless usage policy in your serverless notebooks and job tasks.
canonical_url: https://docs.databricks.com/aws/en/compute/serverless/dependencies
---

# Configure the serverless environment

This page explains how to configure the serverless environment for notebooks and job tasks. For standard serverless notebooks, use the **Environment** side pane to select a base environment, install notebook-scoped dependencies, configure memory, and apply usage policies. For job tasks, configure the environment when you create or edit a task.

With Shared Serverless, notebooks and files in the same Git folder or bundle use an environment managed by a `pyproject.toml` file at the project root instead of a notebook-scoped dependency list. See [Manage the Shared Serverless environment](https://docs.databricks.com/aws/en/compute/serverless/notebooks/shared-serverless.md#project-environment).

To expand the **Environment** side pane, click the ![environment](https://docs.databricks.com/aws/en/images/serverless-compute/serverless-environment-icon.png) button to the right of the notebook.

![Serverless environment pane](https://docs.databricks.com/aws/en/images/serverless-compute/serverless-notebook-environment.png)

## <a id="base-environment" /><a id="environment-version" /> Select a base environment

A base environment determines the pre-installed libraries and environment version available for your serverless notebook. The **Base environment** selector in the **Environment** side pane is where you choose your environment. To see details on each environment version, see [Serverless environment versions](https://docs.databricks.com/aws/en/release-notes/serverless/index.md#environment-version). Databricks recommends using the latest version to get the most up-to-date notebook features.

The **Base environment** selector includes the following options:

* **Standard**: The default serverless base environment with Databricks-provided libraries.
* **ML**: A base environment with the Python and system packages from Databricks Runtime for Machine Learning pre-installed. Use this environment to migrate classic Databricks Runtime for Machine Learning workloads to serverless compute. See [ ML base environment](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/five.md#ml-environment).
* **AI**: An AI-optimized base environment with pre-installed machine learning (ML) libraries. This option appears only when an accelerator (GPU) is selected. See [AI environment](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/five-gpu.md#ai-environment).
* **More**: Expands to show additional options:
  * Previous versions of Standard, ML, and AI environments.
  * **Custom**: Specify a custom environment using a YAML file.
* **Workspace environments**: Lists all compatible base environments configured for your workspace by an administrator.

To select a base environment:

1. In the notebook UI, click the **Environment** side pane ![environment](https://docs.databricks.com/aws/en/images/serverless-compute/serverless-environment-icon.png).
2. Under **Base environment**, select an environment from the drop-down menu.
3. Click **Apply**.

## <a id="add-dependencies" /> Add dependencies to the notebook

Because serverless does not support compute policies or init scripts, you must install custom dependencies using the **Environment** side pane. You can install dependencies individually or use a shareable base environment to install multiple dependencies at once.

Databricks caches your notebook's virtual environment, so dependencies don't reinstall every time you reopen a notebook or resume after inactivity. Job tasks that share the same dependency set also benefit from this cache within a run.

To individually install a dependency:

1. In the notebook UI, click the **Environment** side pane ![environment](https://docs.databricks.com/aws/en/images/serverless-compute/serverless-environment-icon.png).

2. In the **Dependencies** section, enter the path of the dependency in the field then click **+Add dependency**. You can specify a dependency in any format that is valid in a [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file. Python wheel files or Python projects (for example, the directory containing a `pyproject.toml` or a `setup.py`) can be located in workspace files or Unity Catalog volumes.
   * If using a workspace file, the path should be absolute and start with `/Workspace/`.
   * If using a file in a Unity Catalog volume, the path should be in the following format: `/Volumes/<catalog>/<schema>/<volume>/<path>.whl`.

3. Click **Apply** to install the dependencies and restart the Python process.

> [!IMPORTANT]
>
> Do not install PySpark or any library that installs PySpark as a dependency on your serverless notebooks. Doing so will stop your session and result in an error. If this occurs, remove the library and [reset your environment](https://docs.databricks.com/aws/en/compute/serverless/dependencies.md#reset).

To view installed dependencies, click the **Installed** tab in the **Environments** side pane. Open the pip installation logs for the notebook environment by clicking **pip logs** at the bottom of the pane.

> [!NOTE]
>
> Serverless compute does not guarantee a specific CPU architecture. A notebook or job can run on either `aarch64` or `x86_64`, and the architecture can change between runs. Because a dependency might install on a different architecture than the one it was built for, your dependencies must support every architecture the compute might use.
>
> If a dependency is a Python wheel with native (C) extensions, its prebuilt binary is architecture-specific. A wheel built for one architecture fails to install on another, returning an error. To avoid this, use pure-Python wheels (tagged `py3-none-any`) where possible, or include both `aarch64` and `x86_64` wheel variants and constrain each to its architecture with a [`platform_machine` environment marker](https://packaging.python.org/en/latest/specifications/dependency-specifiers/#environment-markers).

> [!NOTE]
>
> Databricks resolves and installs dependencies before your notebook or task code runs. Code in a notebook cell cannot change how dependencies are fetched. Serverless compute also does not support compute-scoped environment variables, so proxy settings applied at runtime have no effect on dependency installation. To install from a private or authenticated package repository, specify `index-url` or `extra-index-url` in the dependency specification. You can also ask a workspace admin to configure the repository as a default package repository. See [Configure default package repositories](https://docs.databricks.com/aws/en/admin/workspace-settings/default-package-repositories.md).

### Configure default package repositories

Workspace admins can configure private or authenticated package repositories as the default pip source for serverless notebooks and jobs. This lets users install packages from internal repositories without specifying `index-url` or `extra-index-url`. See [Configure default package repositories](https://docs.databricks.com/aws/en/admin/workspace-settings/default-package-repositories.md).

### <a id="create-a-custom-environment-specification" />Create a custom environment specification

You can create and reuse custom environment specifications.

1. In a serverless notebook, select a base environment and install any dependencies you want.
2. Click the kebab menu button ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) at the bottom of the environment pane then click **Export environment**.
3. Save the specification as a Workspace file or in a Unity Catalog volume. Make sure you have permission to write to the destination, or the export fails with a `Forbidden` error.

To use your custom environment specification in a notebook, select **Custom** from the **Base environment** drop-down menu, then use the folder ![Folder icon.](https://docs.databricks.com/aws/en/images/product-icons/FolderIcon.svg) to select your YAML file.

### Create common tools to share across your workspace

This example stores a utility in a workspace file and installs it as a serverless notebook dependency:

1. Create a folder with the following structure. Make sure other users have read access to this path:

   ```shell
   helper_utils/
   ├── helpers/
   │   └── __init__.py   # your common functions live here
   ├── pyproject.toml
   ```

2. Populate `pyproject.toml` like this:

   ```python
   [project]
   name = "common_utils"
   version = "0.1.0"
   ```

3. Add a function to the `init.py` file. For example:

   ```python
   def greet(name: str) -> str:
       return f"Hello, {name}!"
   ```

4. In the notebook UI, click the **Environment** side pane ![Environment icon.](https://docs.databricks.com/aws/en/images/product-icons/SlidersIcon.svg).

5. In the **Dependencies** section, click **Add Dependency** then enter the path of your util file. For example: `/Workspace/helper_utils`.

6. Click **Apply**.

You can now use the function in your notebook:

```python
from helpers import greet
print(greet('world'))
```

This outputs as:

```text
Hello, world!
```

## Use AI Runtime (serverless GPU)

> [!NOTE]
> **Preview**
>
> This feature is in [Public Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md).

Follow these steps to configure AI Runtime, powered by serverless GPU compute, on your Databricks notebook:

1. From a notebook, click the compute drop-down menu at the top and select **Serverless GPU**.
2. Click the ![Environment icon.](https://docs.databricks.com/aws/en/images/product-icons/SlidersIcon.svg) to open the **Environment** side pane.
3. Select **A10** or **H100** from the **Accelerator** field.
4. Under **Base environment**, select **Standard** for the default environment or **AI** for the AI-optimized environment with pre-installed machine learning (ML) libraries.
5. Click **Apply** and then **Confirm** that you want to apply AI Runtime to your notebook environment.

For more details, see [AI Runtime](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/index.md).

## <a id="high-memory" />Use high memory serverless compute

> [!NOTE]
> **Preview**
>
> This feature is in [Public Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md).

If you run into out-of-memory errors in your notebook, configure the notebook to use a higher memory size. This memory size setting increases the size of the REPL memory used when running code in the notebook. It doesn't affect the memory size of the Spark session. Serverless usage with high memory has a higher DBU emission rate than standard memory.

The available memory options are:

* **Standard**: 16 GB total memory.
* **High**: 32 GB total memory.

To configure the notebook's memory setting:

1. In the notebook UI, click the **Environment** side pane ![environment](https://docs.databricks.com/aws/en/images/serverless-compute/serverless-environment-icon.png).
2. Under **Memory**, select **High memory**.
3. Click **Apply**.

This memory setting also applies to notebook job tasks that run using the notebook's memory preferences. Updating the memory preference in the notebook affects the next job run.

## <a id="policy" />Select a serverless usage policy

> [!NOTE]
> **Preview**
>
> This feature is in [Public Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md).

[Serverless usage policies](https://docs.databricks.com/aws/en/admin/usage/budget-policies.md) allow your organization to apply custom tags on serverless usage for granular billing attribution.

If your workspace uses serverless usage policies, select the policy you want to apply to the notebook. If a user is assigned to only one serverless usage policy, that policy applies by default.

After connecting to serverless compute, select a policy from the **Environment** side pane:

1. In the notebook UI, click the **Environment** side pane ![environment](https://docs.databricks.com/aws/en/images/serverless-compute/serverless-environment-icon.png).
2. Under **Serverless usage policy** select the serverless usage policy you want to apply to your notebook.
3. Click **Apply**.

After applying, all notebook usage picks up the policy's custom tags.

> [!NOTE]
>
> If your notebook originates from a Git repository or does not have an assigned [serverless usage policy](https://docs.databricks.com/aws/en/admin/usage/budget-policies.md), it defaults to your last chosen serverless usage policy when it is next attached to serverless compute.

## <a id="include-environment-source-file-exports" />Include the environment in source file exports

For Python notebooks, you can toggle **Include in source file exports** in the environment configuration. When enabled, the base environment and dependencies are stored in [PEP 723](https://peps.python.org/pep-0723/) format in source file exports. This helps persist the environment configuration when notebooks are stored in [Git folders](https://docs.databricks.com/aws/en/repos/index.md) or downloaded as [source files](https://docs.databricks.com/aws/en/notebooks/notebook-format.md#source-control-notebook-formats).

For example, a notebook using **Standard v5** exports its environment configuration as inline metadata at the top of the file:

```python
# Databricks notebook source
# /// script
# [tool.databricks.environment]
# environment_version = "5"
# ///
print("Hello World!")
```

## <a id="reset" />Reset the environment dependencies

If your notebook is connected to serverless compute, Databricks automatically caches the content of the notebook's virtual environment. This means you generally don't need to reinstall the Python dependencies specified in the **Environment** side pane when you open an existing notebook, even if it has been disconnected due to inactivity.

Python virtual environment caching also applies to jobs. When a job runs, any task that shares the same set of dependencies as a completed task in the same run finishes faster, because the cache already contains the required dependencies.

> [!NOTE]
>
> If you change the implementation of a custom Python package used in a job on serverless, you must also update its version number so that jobs can pick up the latest implementation.

To clear the environment cache and perform a fresh install of the dependencies specified in the **Environment** side pane of a notebook attached to serverless compute, click the arrow next to **Apply** and then click **Reset to defaults**.

If you install packages that break or change the core notebook or Apache Spark environment, remove the offending packages and then reset the environment. Starting a new session does not clear the entire environment cache.

## <a id="libraries" />Configure environment for job tasks

Each job task runs in an isolated environment that includes a base environment and any additional libraries you specify. The base environment sets the Python and Scala runtime version and pre-installed libraries. Tasks inherit the default set of installed libraries from the environment version. To see what's included, see the **Installed Python libraries** or **Installed Java and Scala libraries** section of the [environment version](https://docs.databricks.com/aws/en/release-notes/serverless/index.md#environment-version) you're using.

You can supplement the pre-installed libraries with libraries from [workspace files](https://docs.databricks.com/aws/en/files/workspace.md), Unity Catalog [volumes](https://docs.databricks.com/aws/en/volumes/index.md), or public package repositories. Only dependencies required for the task are installed at runtime.

To configure notebook, Python script, or Python wheel tasks with `pyproject.toml`, see [Configure a project environment with `pyproject.toml`](https://docs.databricks.com/aws/en/compute/serverless/dependencies.md#project-environment).

To pass environment variables to the application code in your tasks, see [Configure environment variables for serverless jobs](https://docs.databricks.com/aws/en/jobs/environment-variables.md).

> [!NOTE]
> **Beta**
>
> Selecting a managed base environment is in beta. The **Base environment** drop-down in the **Configure environment** dialog enables you to select from Databricks-provided environments (such as Standard and ML) or workspace-configured environments. Without this feature, the dialog shows an **Environment version** drop-down instead. Workspace administrators can enable this feature from the **Previews** page.
>
> ![Configure environment dialog showing the Base environment drop-down expanded with Databricks environments and Workspace environments sections](https://docs.databricks.com/aws/en/images/serverless-compute/jobs-configure-environment-base-env.png)

### Configure the environment by task type

How you configure environments in a job depends on the task type:

#### Notebook tasks

Notebook tasks default to **Notebook Environment**, which uses the notebook's own configured base environment and dependencies. You can override this with a job-level environment.

![Environment and Libraries drop-down for a notebook task showing Notebook Environment and Jobs Environment options](https://docs.databricks.com/aws/en/images/serverless-compute/jobs-notebook-task-environment-dropdown.png)

To configure a job-level environment:

1. In the task configuration, click the **Environment and Libraries** drop-down menu.
2. In **Jobs Environment**, click the pencil icon next to **Default**, or click **+ Add new jobs environment**.
3. In the **Configure environment** dialog, under **Environment source**, select **Standard** or **Project**. The **Project** option is available only when your workspace administrator has enabled the **Project-Scoped Shared Compute** preview from the **Previews** page. See [Manage Databricks previews](https://docs.databricks.com/aws/en/admin/workspace-settings/manage-previews.md). If the dialog doesn't show **Environment source**, follow the **Standard** steps.
4. For **Standard**, select from the **Base environment** drop-down menu:
   * **Databricks environments**: Databricks-provided options such as **Standard** and **ML**.
   * **Workspace environments**: Custom environments configured by your workspace administrator. See [Manage workspace base environments](https://docs.databricks.com/aws/en/admin/workspace-settings/base-environment.md).
   * **More**: Previous versions and **Custom** (specify a YAML file).
5. For **Standard**, under **Dependencies**, add any additional libraries. Use any format valid in a [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file. You can also use an absolute path to a workspace file or Unity Catalog volume.
6. For **Project**, in **Project environment**, enter the workspace path to `pyproject.toml` or select the file. Configure the environment version and dependencies in `pyproject.toml`. You cannot also set **Base environment** or **Dependencies**. See [Configure a project environment with `pyproject.toml`](https://docs.databricks.com/aws/en/compute/serverless/dependencies.md#project-environment).
7. Click **Confirm**.

> [!NOTE]
>
> If your workspace does not have the workspace base environment for jobs preview enabled, the **Configure environment** dialog shows an **Environment version** drop-down instead of **Base environment**.
>
> To configure the environment, select a version, then click **+ Add library**. You can specify a workspace file path (starting with `/Workspace/`), a Unity Catalog volume path (starting with `/Volumes/`), or a requirements file reference (for example, `-r /Workspace/path/to/requirements.txt`).

#### Python script and Python wheel tasks

Python script and Python wheel tasks require an environment to be configured.

![Environment and Libraries section for a Python wheel task showing the Add dependency link](https://docs.databricks.com/aws/en/images/serverless-compute/jobs-python-task-add-dependency.png)

1. In the task configuration, under **Environment and Libraries**, click **+ Add dependency**.
2. In the **Configure environment** dialog, under **Environment source**, select **Standard** or **Project**. The **Project** option is available only when your workspace administrator has enabled the **Project-Scoped Shared Compute** preview from the **Previews** page. See [Manage Databricks previews](https://docs.databricks.com/aws/en/admin/workspace-settings/manage-previews.md). If the dialog doesn't show **Environment source**, follow the **Standard** steps.
3. For **Standard**, select from the **Base environment** drop-down menu:
   * **Databricks environments**: Databricks-provided options such as **Standard** and **ML**.
   * **Workspace environments**: Custom environments configured by your workspace administrator. See [Manage workspace base environments](https://docs.databricks.com/aws/en/admin/workspace-settings/base-environment.md).
   * **More**: Previous versions and **Custom** (specify a YAML file).
4. For **Standard**, under **Dependencies**, add any additional libraries.
5. For **Project**, in **Project environment**, enter the absolute workspace path to `pyproject.toml` (for example, `/Workspace/path/to/pyproject.toml`) or select the file. Python wheel tasks do not support relative project-environment paths. Configure the environment version and dependencies in `pyproject.toml`. You cannot also set **Base environment** or **Dependencies**. See [Configure a project environment with `pyproject.toml`](https://docs.databricks.com/aws/en/compute/serverless/dependencies.md#project-environment).
6. Click **Confirm**.

> [!NOTE]
>
> If your workspace does not have the workspace base environment for jobs preview enabled, the **Configure environment** dialog shows an **Environment version** drop-down instead of **Base environment**.
>
> To configure the environment, select a version, then click **+ Add library**. You can specify a workspace file path (starting with `/Workspace/`), a Unity Catalog volume path (starting with `/Volumes/`), or a requirements file reference (for example, `-r /Workspace/path/to/requirements.txt`).

#### Dbt tasks

DBT tasks use a job-level environment for library configuration.

![Environment and Libraries drop-down for a dbt task showing Jobs Environment options](https://docs.databricks.com/aws/en/images/serverless-compute/jobs-dbt-task-environment-dropdown.png)

To configure a job-level environment:

1. In the task configuration, click the **Environment and Libraries** drop-down menu.
2. In **Jobs Environment**, click the pencil icon next to an existing environment, or click **+ Add new jobs environment**.
3. In the **Configure environment** dialog, select from the **Base environment** drop-down menu:
   * **Databricks environments**: Databricks-provided options such as **Standard** and **ML**.
   * **Workspace environments**: Custom environments configured by your workspace administrator. See [Manage workspace base environments](https://docs.databricks.com/aws/en/admin/workspace-settings/base-environment.md).
   * **More**: Previous versions and **Custom** (specify a YAML file).
4. Under **Dependencies**, add any additional libraries. You can specify a library in any format valid in a [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file, or use an absolute path to a workspace file or Unity Catalog volume.
5. Click **Confirm**.

> [!NOTE]
>
> If your workspace does not have the workspace base environment for jobs preview enabled, the **Configure environment** dialog shows an **Environment version** drop-down instead of **Base environment**.
>
> To configure the environment, select a version, then click **+ Add library**. You can specify a workspace file path (starting with `/Workspace/`), a Unity Catalog volume path (starting with `/Volumes/`), or a requirements file reference (for example, `-r /Workspace/path/to/requirements.txt`).

#### JAR tasks

Workspace base environments are not supported for JAR tasks. To configure the environment for a JAR task:

![Environment and Libraries section for a JAR task showing the Add JAR dependency link](https://docs.databricks.com/aws/en/images/serverless-compute/jobs-jar-task-add-dependency.png)

1. In the task configuration, under **Environment and Libraries**, click **+ Add JAR dependency**.
2. In the **Configure environment** dialog:
   * Optionally, enter a path to a YAML file in the **Base environment** field.
   * Select an environment version from the **Environment version** drop-down menu.
   * Under **JAR Dependencies**, add the paths to your JAR files.
3. Click **Confirm**.

To create a custom YAML-based base environment, see [Create a custom environment specification](https://docs.databricks.com/aws/en/compute/serverless/dependencies.md#create-a-custom-environment-specification).

### Environment and compute compatibility

The base environment you select must be compatible with the task's compute type. For example, an environment built for GPU compute is not compatible with CPU compute. In the jobs UI, incompatible environments are unavailable in the base environment drop-down menu.

When you configure a notebook task, the compute type (CPU or GPU) and base environment can each come from either the job settings or the notebook settings.

* If you set a hardware accelerator (GPU) at the job level, you must also select a base environment at the job level. You cannot use the notebook's environment with a job-level accelerator.
* If you have job tasks that reference a notebook, and you update the referenced notebook's compute type (for example, from CPU to GPU), existing tasks might become incompatible with their configured environment. Review your job's environment settings after changing the notebook's compute configuration.
* For API users: if you set the base environment at the job level but the notebook defines the compute type, Databricks validates compatibility at runtime, not at job creation time. If the configuration is incompatible, the run fails with an error.

## <a id="project-environment" />Configure a project environment with `pyproject.toml`

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md). To use it, a workspace admin must turn on **Project-Scoped Shared Compute** from the **Previews** page. See [Manage Databricks previews](https://docs.databricks.com/aws/en/admin/workspace-settings/manage-previews.md).

A project environment configures a serverless job task from a `pyproject.toml` file. Use the file to declare dependencies for notebook, Python script, and Python wheel tasks. To select a project environment for a task, see [Configure environment for job tasks](https://docs.databricks.com/aws/en/compute/serverless/dependencies.md#libraries).

For notebooks that use Shared Serverless, see [Manage the environment with `pyproject.toml`](https://docs.databricks.com/aws/en/compute/serverless/notebooks/shared-serverless.md#project-environment).

### Requirements

* Use [serverless environment version](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/index.md) 5 and above.
* Store `pyproject.toml` in [workspace files](https://docs.databricks.com/aws/en/files/workspace.md), for example `/Workspace/path/to/pyproject.toml`.
* To use `project_environment` in a [bundle](https://docs.databricks.com/aws/en/dev-tools/bundles/index.md), use Databricks CLI version 1.21.0 and above.
* When you use the Jobs API or a bundle, `project_environment` must be the only environment-source field in the environment `spec`. Omit fields such as `environment_version`, `base_environment`, and `dependencies`. Set the environment version and dependencies in `pyproject.toml` instead.

### Prepare the project environment

To define the `pyproject.toml` file, declare the dependencies under `[project]`. Set the serverless environment version under `[tool.databricks.environment]`. For example:

```toml
[project]
name = "my-project"
version = "0.1.0"
dependencies = [
    # Keep your other dependencies here.
    "cowsay==6.1",
]

[tool.databricks.environment]
# Serverless environment version.
environment_version = "6"
```

For a job that installs only project dependencies, an absent or out-of-date `uv.lock` causes the runtime to fall back to `uv pip install -r pyproject.toml`. This fallback resolves dependencies from `pyproject.toml` without enforcing locked versions and does not install the project package itself.

To install the project itself as a package, add a build backend to `pyproject.toml`. For example, to use Hatchling, add the following:

```toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
```

Hatchling builds the package from the source directory that matches the project name. For example, for `my-project`, Hatchling uses `src/my_project/__init__.py`. Project installation requires an up-to-date `uv.lock` file next to `pyproject.toml`. Generate the file with `uv lock` in the project directory.

To check that `uv.lock` matches `pyproject.toml`, run the following command in a notebook in the project directory:

```python
%uv lock --check
```

### <a id="project-environment-bundle" />Configure a project environment in a bundle

Set `project_environment` to the path of `pyproject.toml`. During deployment, the Databricks CLI translates this path to a workspace path.

The following example bundle installs its own package, `my-project`. It uses this layout:

```text
.
├── databricks.yml
├── pyproject.toml
├── uv.lock
├── resources/
│   └── my_project.job.yml
└── src/
    ├── main.py
    └── my_project/
        └── __init__.py
```

The root `pyproject.toml` declares the dependencies, the Hatchling build backend, and the environment version:

```toml
[project]
name = "my-project"
version = "0.1.0"
dependencies = [
    "cowsay==6.1",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.databricks.environment]
environment_version = "6"
```

Save the following configuration as `resources/my_project.job.yml`. The `project_environment` and `python_file` paths are relative to this file:

```yaml
resources:
  jobs:
    my_project_job:
      name: my-project-job
      environments:
        - environment_key: project
          spec:
            project_environment: ../pyproject.toml
      tasks:
        - task_key: main
          environment_key: project
          spark_python_task:
            python_file: ../src/main.py
```
