Skip to content

Commit e5ced13

Browse files
Update sagemaker_ui_post_startup.sh
1 parent 912b6d9 commit e5ced13

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

build_artifacts/v3/v3.1/v3.1.0/dirs/etc/sagemaker-ui/sagemaker_ui_post_startup.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
#!/bin/bash
22
set -eux
33

4-
# Only run the following commands if SAGEMAKER_APP_TYPE_LOWERCASE is jupyterlab
5-
if [ "${SAGEMAKER_APP_TYPE_LOWERCASE}" = "jupyterlab" ]; then
6-
# Override Jupyter AI config file with specific content only for 2.6
7-
# this is a potential workaround for Q chat issue where the chat does not
8-
# load since it does not pick up the latest config file
9-
NB_USER=sagemaker-user
10-
# Check if Jupyter AI config file exists, override with specific content if so only for 2.6
11-
# this is a potential workaround for Q chat issue
12-
JUPYTER_AI_CONFIG_PATH=/home/${NB_USER}/.local/share/jupyter/jupyter_ai/config.json
13-
JUPYTER_AI_CONFIG_CONTENT='{
14-
"model_provider_id": "amazon-q:Q-Developer",
15-
"embeddings_provider_id": null,
16-
"send_with_shift_enter": false,
17-
"fields": {},
18-
"api_keys": {},
19-
"completions_model_provider_id": null,
20-
"completions_fields": {},
21-
"embeddings_fields": {}
22-
}'
23-
24-
# Overwrite the file if it exists (or create it if it doesn't)
25-
echo "$JUPYTER_AI_CONFIG_CONTENT" > "$JUPYTER_AI_CONFIG_PATH"
26-
fi
27-
284
# Writes script status to file. This file is read by an IDE extension responsible for dispatching UI post-startup-status to the user.
295
write_status_to_file() {
306
local status="$1"

0 commit comments

Comments
 (0)