Connect to AI Runtime
AI Runtime for single-node tasks is in Public Preview. The distributed training API for multi-GPU workloads remain in Beta.
This article describes how to connect to AI Runtime from interactive notebooks, scheduled jobs, and the Jobs API.
Interactive (Notebooks)
This is the primary way to use AI Runtime. To connect your notebook and configure the environment:
- From a notebook, click the Connect drop-down menu at the top and select Serverless GPU.
- Click the
to open the Environment side panel.
- Select A10 or H100 from the Accelerator field.
- Select None for the default environment or AI v4 for the AI environment from the Base environment field.
- Click Apply and then Confirm that you want to apply the AI Runtime to your notebook environment.
Connection to your compute auto-terminates after 60 minutes of inactivity.
For operations that do not require GPUs (for example, cloning a Git repository, converting data formats, or exploratory data analysis), attach your notebook to a CPU cluster to preserve GPU resources.
Jobs (Scheduled)
You can schedule notebooks that use serverless GPU as recurring jobs. See Create and manage scheduled notebook jobs for more details.
After you open the notebook you want to use:
- Select the Schedule button on the top right.
- Select Add schedule.
- Populate the New schedule form with the Job name, Schedule, and Compute.
- Select Create.
You can also create and schedule jobs from the Jobs and pipelines UI. See Create a new job for step-by-step guidance.
Adding dependencies using the Environments panel is not supported for serverless GPU scheduled jobs. Dependencies must be installed programmatically within your notebook (for example, %pip install). Auto-recovery is not supported — if your job fails due to incompatible packages, you must manually fix and re-run. For workloads that may exceed the 7-day maximum runtime, implement manual checkpointing to allow resumption.
Jobs API and Databricks Asset Bundles
You can programmatically create and manage AI Runtime jobs using the Databricks Jobs API or Databricks Asset Bundles. Configure the compute type as serverless GPU in your job or bundle definition to automate deployment pipelines.
The following example shows a Databricks Asset Bundle configuration for an AI Runtime on serverless GPU job:
resources:
jobs:
sample_job:
name: sample_job_h100
trigger:
periodic:
interval: 1
unit: DAYS
parameters:
- name: catalog
default: ${var.catalog}
- name: schema
default: ${var.schema}
environments:
- environment_key: default
spec:
environment_version: '4'
tasks:
- task_key: notebook_task
notebook_task:
notebook_path: /Workspace/Users/your_email/your_notebook
environment_key: default
compute:
hardware_accelerator: GPU_8xH100