cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Can you access a repo file in an init script?

tatekeller
New Contributor

I'd like to configure a cluster with python libraries as defined in a requirements file. I have a pip requirements.txt file in a private repo which I have integrated on Databricks (and I can access it through the UI and view it on Databricks). I update this requirements file from time to time with new libraries, which is why I keep in on a repo.

I uploaded an init script to the DBFS and specified it under Init Scripts for the Cluster. Here is what my file looks like (with the brackets filled in):

#!/bin/bash
/databricks/python/bin/pip install -r /Repos/<email>/<repo-name>/<folder>/requirements.txt

But initialization of my cluster fails. The error message says only the following:

Cluster scoped init script dbfs:/FileStore/init_scripts/db_init.sh failed: Script exit status is non-zero
 

Is there something that I am doing wrong, or is this even possible to achieve?

1 REPLY 1

sher
Valued Contributor II

you can install in a 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