Skip to content

Commit c38b7ed

Browse files
Better support for popular SageMaker Studio images
1 parent 2628c4f commit c38b7ed

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

kernel-lc-config.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ VNC_PASSWORD="123456"
1616
# OR keep it as is and put the value into ~/.sm-ssh-owner to override
1717
LOCAL_USER_ID="AIDACKCEVSQ6C2EXAMPLE"
1818

19+
set -e
1920

2021
hostname
2122
cat /opt/ml/metadata/resource-metadata.json
2223

23-
pip uninstall --root-user-action ignore -y -q awscli
24-
pip install --root-user-action ignore -q sagemaker-ssh-helper
24+
pip uninstall -y -q awscli
25+
pip install -q sagemaker-ssh-helper
2526

2627
# Uncomment two lines below to update SageMaker SSH Helper to the latest dev version from main branch
27-
#git clone https://github.com/aws-samples/sagemaker-ssh-helper.git
28-
#cd sagemaker-ssh-helper && pip install . && cd ..
28+
#git clone https://github.com/aws-samples/sagemaker-ssh-helper.git ./sagemaker-ssh-helper/ || echo 'Already cloned'
29+
#cd ./sagemaker-ssh-helper/ && git pull --no-rebase && pip install . && cd ..
2930

3031
apt-get -y update
3132
apt-get -y install procps

sagemaker_ssh_helper/cdk/iam_ssm/iam_ssm_stack_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
7070
"sagemaker:DescribeTrainingJob",
7171
"sagemaker:DescribeProcessingJob",
7272
"sagemaker:DescribeModel",
73+
"sagemaker:DescribeEndpointConfig",
7374
"sagemaker:DescribeEndpoint",
7475
"sagemaker:DescribeTransformJob",
7576
"sagemaker:DescribeHyperParameterTuningJob",
@@ -78,6 +79,9 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
7879
"sagemaker:DeleteEndpoint",
7980
"sagemaker:InvokeEndpoint",
8081
"sagemaker:StopTrainingJob",
82+
"sagemaker:CreateApp",
83+
"sagemaker:DeleteApp",
84+
"sagemaker:DescribeApp",
8185
],
8286
resources=["*"]
8387
),

0 commit comments

Comments
 (0)