Created
November 1, 2022 01:38
-
-
Save juliensimon/4eccabf58fa2d97a294d181a525b0127 to your computer and use it in GitHub Desktop.
Notebook instance instructions
This file contains 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
Replace the "# Install VS Code server" Block with:
Install VS Code server
cd /home/ec2-user/SageMaker
curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.2.0/amazon-sagemaker-codeserver-0.2.0.tar.gz
tar -xvzf amazon-sagemaker-codeserver-0.2.0.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
There is a new version which includes the kernel already :)