Skip to content

Commit dad72e9

Browse files
Merge branch 'main' into release-2.7.4
2 parents 52e81ba + 2f32588 commit dad72e9

File tree

12 files changed

+51
-5
lines changed

12 files changed

+51
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
conda-forge::mcp
22
conda-forge::uv
3+
conda-forge::sagemaker-gen-ai-jupyterlab-extension[version='>=0.1.0,<2.0.0']
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
conda-forge::mcp
22
conda-forge::uv
3+
conda-forge::sagemaker-gen-ai-jupyterlab-extension[version='>=0.1.0,<2.0.0']
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
https://open-vsx.org/api/ms-toolsai/jupyter/2024.5.0/file/ms-toolsai.jupyter-2024.5.0.vsix
22
https://open-vsx.org/api/ms-python/python/2023.20.0/file/ms-python.python-2023.20.0.vsix
3-
https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/3.30.0/file/amazonwebservices.aws-toolkit-vscode-3.30.0.vsix
3+
https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/3.69.0/file/amazonwebservices.aws-toolkit-vscode-3.69.0.vsix
44
https://open-vsx.org/api/amazonwebservices/amazon-q-vscode/1.58.0/file/amazonwebservices.amazon-q-vscode-1.58.0.vsix

template/v2/dirs/etc/sagemaker-ui/jupyter/lab/settings/page_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"@amzn/sagemaker-jupyterlab-extensions:spacemenu": true,
99
"@amzn/amazon_sagemaker_sql_editor": true,
1010
"@sagemaker-studio:EmrCluster": true,
11-
"@jupyterlab/scheduler": true,
1211
"@jupyter/collaboration-extension": true
1312
}
1413
}

template/v2/dirs/etc/sagemaker-ui/jupyter/server/jupyter_server_config.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import os
22

3+
from sagemaker_studio_jupyter_scheduler.scheduler import (
4+
SagemakerEnvironmentManager,
5+
SageMakerJobFilesManager,
6+
SageMakerUnifiedStudioScheduler,
7+
)
8+
39
c.ServerApp.terminado_settings = {"shell_command": ["/bin/bash"]}
410
region = os.environ.get("AWS_REGION")
511
csp_rule = os.environ.get("JUPYTERSERVER_CSP_RULE")
@@ -27,4 +33,9 @@
2733
module_location = os.path.dirname(module.__file__)
2834
c.LanguageServerManager.extra_node_roots = [f"{module_location}/sql-language-server"]
2935
except:
36+
3037
pass
38+
39+
c.SchedulerApp.scheduler_class = SageMakerUnifiedStudioScheduler
40+
c.SchedulerApp.environment_manager_class = SagemakerEnvironmentManager
41+
c.SchedulerApp.job_files_manager_class = SageMakerJobFilesManager

template/v2/dirs/usr/local/bin/start-jupyter-server

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ -n "$SAGEMAKER_RECOVERY_MODE" ]; then
1010
else
1111
# Activate conda environment 'base'
1212
micromamba activate base
13-
jupyter labextension disable @amzn/sagemaker-data-explorer-jl-plugin sagemaker-data-explorer:plugin amzn/sagemaker-ui-theme-jlplugin @amzn/sagemaker-ui-doc-manager-jl-plugin @amzn/sagemaker-connection-magics-jlextension
13+
jupyter labextension disable @amzn/sagemaker-data-explorer-jl-plugin sagemaker-data-explorer:plugin amzn/sagemaker-ui-theme-jlplugin @amzn/sagemaker-ui-doc-manager-jl-plugin @amzn/sagemaker-connection-magics-jlextension @amzn/sagemaker_gen_ai_jupyterlab_extension
1414
fi
1515

1616
# Start Jupyter server in rtc mode for shared spaces

template/v2/dirs/usr/local/bin/start-sagemaker-ui-jupyter-server

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ if [ -n "$SAGEMAKER_RECOVERY_MODE" ]; then
1010
else
1111
# Activate conda environment 'base' which is the default for Cosmos
1212
micromamba activate base
13+
14+
# Disable jupyter-ai in favor of sagemaker_gen_ai_jupyterlab_extension
15+
jupyter labextension disable @jupyter-ai/core
1316
fi
1417

1518
sudo cp -r /etc/sagemaker-ui/kernels/. /opt/conda/share/jupyter/kernels/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
https://open-vsx.org/api/ms-toolsai/jupyter/2024.5.0/file/ms-toolsai.jupyter-2024.5.0.vsix
22
https://open-vsx.org/api/ms-python/python/2023.20.0/file/ms-python.python-2023.20.0.vsix
3-
https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/3.30.0/file/amazonwebservices.aws-toolkit-vscode-3.30.0.vsix
3+
https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/3.69.0/file/amazonwebservices.aws-toolkit-vscode-3.69.0.vsix
44
https://open-vsx.org/api/amazonwebservices/amazon-q-vscode/1.58.0/file/amazonwebservices.amazon-q-vscode-1.58.0.vsix

template/v3/dirs/etc/sagemaker-ui/jupyter/lab/settings/page_config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"@amzn/sagemaker-jupyterlab-extensions:spacemenu": true,
99
"@amzn/amazon_sagemaker_sql_editor": true,
1010
"@sagemaker-studio:EmrCluster": true,
11-
"@jupyterlab/scheduler": true,
1211
"@jupyter/collaboration-extension": true
1312
}
1413
}

template/v3/dirs/etc/sagemaker-ui/jupyter/server/jupyter_server_config.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import os
22

3+
from sagemaker_studio_jupyter_scheduler.scheduler import (
4+
SagemakerEnvironmentManager,
5+
SageMakerJobFilesManager,
6+
SageMakerUnifiedStudioScheduler,
7+
)
8+
39
c.ServerApp.terminado_settings = {"shell_command": ["/bin/bash"]}
410
region = os.environ.get("AWS_REGION")
511
csp_rule = os.environ.get("JUPYTERSERVER_CSP_RULE")
@@ -28,3 +34,7 @@
2834
c.LanguageServerManager.extra_node_roots = [f"{module_location}/sql-language-server"]
2935
except:
3036
pass
37+
38+
c.SchedulerApp.scheduler_class = SageMakerUnifiedStudioScheduler
39+
c.SchedulerApp.environment_manager_class = SagemakerEnvironmentManager
40+
c.SchedulerApp.job_files_manager_class = SageMakerJobFilesManager

0 commit comments

Comments
 (0)