Forked from juliensimon/gist:4eccabf58fa2d97a294d181a525b0127
Created
August 20, 2023 21:58
-
-
Save don-tpanic/66d8318474f83f5f6061e789f7b49b7f to your computer and use it in GitHub Desktop.
Notebook instance instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### CREATE NOTEBOOK INSTANCE | |
export HOME=/home/ec2-user | |
# Install and enable Git LFS | |
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash | |
sudo yum install git-lfs -y | |
git lfs install | |
# Clone my repository | |
git clone https://gitlab.com/juliensimon/huggingface-demos.git /home/ec2-user/SageMaker/huggingface-demos | |
# Set credential helper for 24 hours | |
git config --global credential.helper cache | |
git config --global credential.helper "cache --timeout=86400" | |
# Install VS Code server | |
cd /home/ec2-user/SageMaker | |
curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.1.5/amazon-sagemaker-codeserver-0.1.5.tar.gz | |
tar -xvzf amazon-sagemaker-codeserver-0.1.5.tar.gz | |
cd amazon-sagemaker-codeserver/install-scripts/notebook-instances | |
chmod +x install-codeserver.sh | |
chmod +x setup-codeserver.sh | |
sudo ./install-codeserver.sh | |
sudo ./setup-codeserver.sh | |
### START NOTEBOOK INSTANCE | |
export HOME=/home/ec2-user | |
# Install and enable Git LFS | |
# We need to do this every time as the install is not on the persistent volume | |
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash | |
sudo yum install git-lfs -y | |
git lfs install | |
# Set credential helper for 24 hours | |
git config --global credential.helper cache | |
git config --global credential.helper "cache --timeout=86400" | |
# Enable VS Code server | |
cd /home/ec2-user/SageMaker | |
cd amazon-sagemaker-codeserver/install-scripts/notebook-instances | |
sudo ./setup-codeserver.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment