Skip to content

Commit ae511d0

Browse files
update scripts for recovery mode
1 parent 188ff02 commit ae511d0

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

build_artifacts/v2/v2.3/v2.3.0/dirs/usr/local/bin/entrypoint-jupyter-server

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ set -e
66
# micromamba commands (e.g. using `micromamba activate` to activate environments)
77
eval "$(micromamba shell hook --shell=bash)"
88

9-
# Activate conda environment 'base', where supervisord is installed
10-
micromamba activate base
9+
if [ -n "$SAGEMAKER_RECOVERY_MODE" ]; then
10+
export HOME=$SAGEMAKER_RECOVERY_MODE
11+
# Activate conda environment `sagemaker-recovery-mode`
12+
micromamba activate sagemaker-recovery-mode
13+
else
14+
# Activate conda environment 'base'
15+
micromamba activate base
16+
fi
1117

1218
# Set up SAGEMAKER_APP_TYPE_LOWERCASE based on SAGEMAKER_APP_TYPE
1319
export SAGEMAKER_APP_TYPE_LOWERCASE=$(echo $SAGEMAKER_APP_TYPE | tr '[:upper:]' '[:lower:]')

build_artifacts/v2/v2.3/v2.3.0/dirs/usr/local/bin/start-jupyter-server

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ set -e
33

44
eval "$(micromamba shell hook --shell=bash)"
55

6-
# Activate conda environment 'base', which is the default environment for Cosmos
7-
micromamba activate base
6+
if [ -n "$SAGEMAKER_RECOVERY_MODE" ]; then
7+
export HOME=$SAGEMAKER_RECOVERY_MODE
8+
# Activate conda environment `sagemaker-recovery-mode`
9+
micromamba activate sagemaker-recovery-mode
10+
else
11+
# Activate conda environment 'base'
12+
micromamba activate base
13+
fi
814

915
# Start Jupyter server in rtc mode for shared spaces
1016
if [ -n "$SAGEMAKER_APP_TYPE_LOWERCASE" ] && [ "$SAGEMAKER_SPACE_TYPE_LOWERCASE" == "shared" ]; then

0 commit comments

Comments
 (0)