cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Install system libraries on the cluster

leungi
Contributor

The `Library` option in cluster config allows installation of language-specific libraries - e.g., PyPi for Python, CRAN for R.

Some of these libraries - e.g., `sf` - require system libraries - e.g., `libudunits2-dev`, `libgdal-dev`.

How may one install system libraries in cluster permanently?

1 ACCEPTED SOLUTION

Accepted Solutions

feiyun0112
Honored Contributor
2 REPLIES 2

feiyun0112
Honored Contributor

Thanks @feiyun0112.

For future self, steps:

1. Create a `.sh` file with the following:

#!/bin/bash

set -euxo pipefail

if [[ $DB_IS_DRIVER = "TRUE" ]]; then
  sudo apt-get -y update && apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev
fi

2. Add `.sh` file to cluster by editing its settings: Advanced Options > Init Scripts.

3. Relaunch cluster.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group