aws / studio-lab-examples

Example notebooks for working with SageMaker Studio Lab. Sign up for an account at the link below!
https://studiolab.sagemaker.aws
Apache License 2.0
655 stars 193 forks source link

.bashrc file is not persistent in SMSL environment #123

Closed austinlasseter closed 2 years ago

austinlasseter commented 2 years ago

I'd like to use the Heroku CLI for pushing code to a Heroku git repository. I've installed the CLI on my SMSL instance (I wrote a post about how to do this, here: https://austinlasseter.medium.com/installing-the-heroku-cli-on-aws-sagemaker-studio-lab-6e53aaff1374). Whenever I open a new SMSL session, I need to add heroku to $PATH each time, as follows.

echo "export PATH=\$PATH:~/heroku/bin" >> ~/.bashrc
source ~/.bashrc

On a typical Linux instance, it's not necessary to do this repeatedly. Is there a way to ensure that my .bashrc will be persistent in SMSL? Thanks.

icoxfog417 commented 2 years ago

@austinlasseter Thank you for writing the nice blog to connect Heroku! We can use /home/studio-lab-user/.bashrc instead ~/.bashrc. I confirmed that the modification to /home/studio-lab-user/.bashrc is preserved after shutting down the instance.

austinlasseter commented 2 years ago

Thanks, this solved it.