forked from NVIDIA/spark-rapids-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_cluster.sh
executable file
·58 lines (55 loc) · 2.1 KB
/
start_cluster.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.
if [[ -z ${INIT_PATH} ]]; then
echo "Please export INIT_PATH per README.md"
exit 1
fi
json_config=$(cat <<EOF
{
"cluster_name": "optuna-xgboost-gpu",
"spark_version": "13.3.x-gpu-ml-scala2.12",
"spark_conf": {
"spark.task.resource.gpu.amount": "1",
"spark.executorEnv.PYTHONPATH": "/databricks/jars/rapids-4-spark_2.12-25.02.1.jar:/databricks/spark/python:/databricks/python3",
"spark.executor.cores": "8",
"spark.rapids.memory.gpu.minAllocFraction": "0.0001",
"spark.plugins": "com.nvidia.spark.SQLPlugin",
"spark.locality.wait": "0s",
"spark.sql.cache.serializer": "com.nvidia.spark.ParquetCachedBatchSerializer",
"spark.rapids.memory.gpu.pooling.enabled": "false",
"spark.executor.resource.gpu.amount": "1",
"spark.rapids.sql.explain": "NONE",
"spark.sql.execution.sortBeforeRepartition": "false",
"spark.rapids.sql.python.gpu.enabled": "true",
"spark.rapids.memory.pinnedPool.size": "2G",
"spark.task.maxFailures": "1",
"spark.python.daemon.module": "rapids.daemon_databricks",
"spark.rapids.sql.batchSizeBytes": "512m",
"spark.sql.adaptive.enabled": "false",
"spark.rapids.sql.format.parquet.reader.type": "MULTITHREADED",
"spark.sql.execution.arrow.pyspark.enabled": "true",
"spark.rapids.sql.format.parquet.multiThreadedRead.maxNumFilesParallel": "20",
"spark.sql.files.maxPartitionBytes": "512m",
"spark.rapids.sql.multiThreadedRead.numThreads": "20",
"spark.rapids.sql.concurrentGpuTasks": "2"
},
"node_type_id": "Standard_NC8as_T4_v3",
"driver_node_type_id": "Standard_NC8as_T4_v3",
"spark_env_vars": {
"LIBCUDF_CUFILE_POLICY": "OFF"
},
"autotermination_minutes": 60,
"enable_elastic_disk": true,
"init_scripts": [
{
"workspace": {
"destination": "${INIT_PATH}"
}
}
],
"runtime_engine": "STANDARD",
"num_workers": 4
}
EOF
)
databricks clusters create --json "$json_config"