Skip to content

Commit 867f829

Browse files
authored
Document support of requirements.txt specification in cluster libraries (#3637)
Support for `requirements` parameter came via SDK, but documentation was missing. Fixes #3471
1 parent cd9df5e commit 867f829

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

docs/resources/cluster.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ library {
199199
}
200200
```
201201

202+
Installing Python libraries listed in the `requirements.txt` file. Only Workspace paths and Unity Catalog Volumes paths are supported. Requires a cluster with DBR 15.0+.
203+
204+
205+
```hcl
206+
library {
207+
requirements = "/Workspace/path/to/requirements.txt"
208+
}
209+
```
210+
202211
Installing artifacts from Maven repository. You can also optionally specify a `repo` parameter for a custom Maven-style repository, that should be accessible without any authentication. Maven libraries are resolved in Databricks Control Plane, so repo should be accessible from it. It can even be properly configured [maven s3 wagon](https://github.com/seahen/maven-s3-wagon), [AWS CodeArtifact](https://aws.amazon.com/codeartifact/) or [Azure Artifacts](https://azure.microsoft.com/en-us/services/devops/artifacts/).
203212

204213
```hcl

docs/resources/library.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ resource "databricks_library" "fbprophet" {
8383
}
8484
```
8585

86+
## Python requirements files
87+
88+
Installing Python libraries listed in the `requirements.txt` file. Only Workspace paths and Unity Catalog Volumes paths are supported. Requires a cluster with DBR 15.0+.
89+
90+
91+
```hcl
92+
resource "databricks_library" "libraries" {
93+
cluster_id = databricks_cluster.this.id
94+
requirements = "/Workspace/path/to/requirements.txt"
95+
}
96+
```
97+
98+
8699
## Python EGG
87100

88101
```hcl
@@ -110,6 +123,7 @@ resource "databricks_library" "rkeops" {
110123
}
111124
```
112125

126+
113127
## Import
114128

115129
-> **Note** Importing this resource is not currently supported.

0 commit comments

Comments
 (0)