File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
template/v2/dirs/etc/sagemaker-ui/kernels/kernel_launchers Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 3
3
kernel_type=$2
4
4
connection_file=$4
5
5
6
- sparkmagicHomeDir=/home/sagemaker-user/.sparkmagic
7
- mkdir -p $sparkmagicHomeDir
8
- config_file_path=${sparkmagicHomeDir} /config.json
6
+ if [ ! -e " /opt/ml/metadata/resource-metadata.json" ] && [ -z " $SPARKMAGIC_CONF_DIR " ]; then
7
+ export SPARKMAGIC_CONF_DIR=" $SM_EXECUTION_INPUT_PATH "
8
+ fi
9
+
10
+ if [ -n " $SPARKMAGIC_CONF_DIR " ]; then
11
+ mkdir -p $SPARKMAGIC_CONF_DIR
12
+ config_file_path=${SPARKMAGIC_CONF_DIR} /config.json
13
+ else
14
+ sparkmagicHomeDir=${HOME} /.sparkmagic
15
+ mkdir -p $sparkmagicHomeDir
16
+ config_file_path=${sparkmagicHomeDir} /config.json
17
+ fi
18
+
9
19
if [ ! -f " $config_file_path " ]; then
10
20
cat << EOT > "$config_file_path "
11
21
{
You can’t perform that action at this time.
0 commit comments