Skip to content

Commit db428d1

Browse files
Env diagnostics for SageMaker Studio
1 parent cf1bbea commit db428d1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sagemaker_ssh_helper/sm-ssh-ide

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/bash -l
22
# Very important to start with 'bash -l' - to escape SageMaker Studio notebook environment
33

4+
if [ ! -f /opt/.sagemakerinternal/conda/bin/python ]; then
5+
echo "sm-ssh-ide: ERROR: Must be running inside SageMaker Studio"
6+
exit 2
7+
fi
8+
49
dir=$(dirname "$0")
510
source "$dir"/sm-helper-functions
611

@@ -196,7 +201,7 @@ elif [[ "$1" == "env-diagnostics" ]]; then
196201
echo "Conda location: $(which conda || echo 'Not found')"
197202
echo "Conda environments: $(conda env list || echo 'Not found')"
198203

199-
echo "SageMaker Studio Python location: $($0 get-studio-python-location || echo 'Not found')"
204+
echo "SageMaker Studio Python location: $($0 get-studio-python-path || echo 'Not found')"
200205
echo "SageMaker Studio Python version: $($0 get-studio-python-version || echo 'Not found')"
201206

202207
elif [[ "$1" == "stop" ]]; then

0 commit comments

Comments
 (0)