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
416 stars 248 forks source link

Updated version check for AL1 dependent commands. #111

Closed tayodok closed 1 year ago

tayodok commented 1 year ago

Issue #, if available:

N/A.

Description of changes:

Updated scripts with commands dependent of AMI version to appropriately check platform version. This allows scripts to run on any platform without suppressing errors.

Testing Done

All versions created / started up successfully with LCCs.

For Environment variable setting - same check executed on all three platforms.

sh-4.2$ printenv
...
SHELL=/bin/sh
HISTSIZE=1000
CONDA_SHLVL=1
CONDA_PROMPT_MODIFIER=(JupyterSystemEnv)
GSETTINGS_SCHEMA_DIR_CONDA_BACKUP=
TEST_VAR=

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