aws-samples / amazon-sagemaker-notebook-instance-lifecycle-config-samples

A collection of sample scripts to customize Amazon SageMaker Notebook Instances using Lifecycle Configurations
MIT No Attribution
422 stars 250 forks source link

logic for restart command to work on AL1 and AL2 platforms. #104

Closed tayodok closed 1 year ago

tayodok commented 1 year ago

Issue #, if available: https://issues.amazon.com/issues/MD-10312

Description of changes: Added logic for restart command after conda ebs creation to be determined by running platform.

Testing Done LCC tested on legacy AL1v1 and new AL2v2 notebooks.

Loaded current LCC and observed failure error: /tmp/OnStart_2022-11-17-19-092nflww27: line 33: restart: command not found on AL2 notebook. AL1 was successful.

After inserting fix both notebooks are successful.

# Provide your commands here
/your/commands/here

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.