Skip to content

Commit

Permalink
update scripts for recovery mode
Browse files Browse the repository at this point in the history
  • Loading branch information
claytonparnell committed Jan 13, 2025
1 parent 188ff02 commit ae511d0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ set -e
# micromamba commands (e.g. using `micromamba activate` to activate environments)
eval "$(micromamba shell hook --shell=bash)"

# Activate conda environment 'base', where supervisord is installed
micromamba activate base
if [ -n "$SAGEMAKER_RECOVERY_MODE" ]; then
export HOME=$SAGEMAKER_RECOVERY_MODE
# Activate conda environment `sagemaker-recovery-mode`
micromamba activate sagemaker-recovery-mode
else
# Activate conda environment 'base'
micromamba activate base
fi

# Set up SAGEMAKER_APP_TYPE_LOWERCASE based on SAGEMAKER_APP_TYPE
export SAGEMAKER_APP_TYPE_LOWERCASE=$(echo $SAGEMAKER_APP_TYPE | tr '[:upper:]' '[:lower:]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ set -e

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

# Activate conda environment 'base', which is the default environment for Cosmos
micromamba activate base
if [ -n "$SAGEMAKER_RECOVERY_MODE" ]; then
export HOME=$SAGEMAKER_RECOVERY_MODE
# Activate conda environment `sagemaker-recovery-mode`
micromamba activate sagemaker-recovery-mode
else
# Activate conda environment 'base'
micromamba activate base
fi

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

0 comments on commit ae511d0

Please sign in to comment.