forked from dotnet/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db-init.sh
42 lines (33 loc) · 1.92 KB
/
db-init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
##############################################################################
# Description:
# This script installs the worker binaries and your app dependencies onto
# your Databricks Spark cluster.
#
# Usage:
# Change the variables below appropriately.
#
##############################################################################
################################# CHANGE THESE ###############################
# DOTNET_SPARK_RELEASE to point to the appropriate version you downloaded from the
# https://github.com/dotnet/spark Releases section. For instance, for v0.2.0, you
# would set it to the following URI:
# https://github.com/dotnet/spark/releases/download/v0.2.0/Microsoft.Spark.Worker.netcoreapp2.1.linux-x64-0.2.0.tar.gz
DOTNET_SPARK_RELEASE=https://github.com/dotnet/spark/releases/download/v0.2.0/Microsoft.Spark.Worker.netcoreapp2.1.linux-x64-0.2.0.tar.gz
# No need to change this unless you choose to use a different location
DBFS_INSTALLATION_ROOT=/dbfs/spark-dotnet
DOTNET_SPARK_WORKER_INSTALLATION_PATH=/usr/local/bin
###############################################################################
set +e
/bin/bash $DBFS_INSTALLATION_ROOT/install-worker.sh github $DOTNET_SPARK_RELEASE $DOTNET_SPARK_WORKER_INSTALLATION_PATH
##############################################################################
# Uncomment below to deploy application dependencies to workers if submitting
# jobs using the "Set Jar" task (https://docs.databricks.com/user-guide/jobs.html#jar-jobs)
# Change the variables below appropriately
##############################################################################
################################# CHANGE THESE ###############################
#APP_DEPENDENCIES=/dbfs/apps/dependencies
#WORKER_PATH=`readlink $DOTNET_SPARK_WORKER_INSTALLATION_PATH/Microsoft.Spark.Worker`
#if [ -f $WORKER_PATH ] && [ -d $APP_DEPENDENCIES ]; then
# sudo cp -fR $APP_DEPENDENCIES/. `dirname $WORKER_PATH`
#fi