Skip to content

Commit dd1016b

Browse files
tejaskashTejas Kashinath
andauthored
Writing SMUS_PROJECT_DIR to a JSON file to be accessed by JupyterLab Extensions (#729)
Co-authored-by: Tejas Kashinath <[email protected]>
1 parent badbc01 commit dd1016b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

template/v2/dirs/etc/sagemaker-ui/sagemaker_ui_post_startup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ else
172172
echo readonly SMUS_PROJECT_DIR >> ~/.bashrc
173173
fi
174174

175+
# Write SMUS_PROJECT_DIR to a JSON file to be accessed by JupyterLab Extensions
176+
jq -n \
177+
--arg smusProjectDirectory "$SMUS_PROJECT_DIR" \
178+
'{ smusProjectDirectory: $smusProjectDirectory }' > $HOME/.config/smus-storage-metadata.json
179+
175180
if [ $is_s3_storage_flag -ne 0 ]; then
176181
# Creating a directory where the repository will be cloned
177182
mkdir -p "$HOME/src"

template/v3/dirs/etc/sagemaker-ui/sagemaker_ui_post_startup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ else
172172
echo readonly SMUS_PROJECT_DIR >> ~/.bashrc
173173
fi
174174

175+
# Write SMUS_PROJECT_DIR to a JSON file to be accessed by JupyterLab Extensions
176+
jq -n \
177+
--arg smusProjectDirectory "$SMUS_PROJECT_DIR" \
178+
'{ smusProjectDirectory: $smusProjectDirectory }' > $HOME/.config/smus-storage-metadata.json
179+
175180
if [ $is_s3_storage_flag -ne 0 ]; then
176181
# Creating a directory where the repository will be cloned
177182
mkdir -p "$HOME/src"

0 commit comments

Comments
 (0)