Closed MarcusRosen-Rio closed 2 years ago
try the following updated command instead of this [1]. Worked for me for both notebook versions.
(crontab -l 2>/dev/null; echo "/5 * /usr/bin/python3 $PWD/autostop.py --time $IDLE_TIME --ignore-connections") | crontab -
Hi,
The auto Stop Idle Lifecycle Configuration hangs when using Amazon Linux V2 (notebook-al2-v1) platform identifier type for Notebook, the same policy works without fail on V1. Suspect this is related to python2 Python3 upgrade.
https://github.com/aws-samples/amazon-sagemaker-notebook-instance-lifecycle-config-samples/tree/master/scripts/auto-stop-idle