Skip to content

Instantly share code, notes, and snippets.

@philwhln
Created February 19, 2021 22:43
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philwhln/245c32ce7b52f75dd6a689cf38d089e0 to your computer and use it in GitHub Desktop.
Save philwhln/245c32ce7b52f75dd6a689cf38d089e0 to your computer and use it in GitHub Desktop.
vast.ai setup script for model training workflow with jupyter notebook and git
apt-get update
apt-get install -y curl git-core
mkdir -p ~/.ssh && chmod 700 ~/.ssh
cat > ~/.ssh/id_rsa <<- EOM
-----BEGIN OPENSSH PRIVATE KEY-----
YOUR SSH PRIVATE KEY GOES HERE
-----END OPENSSH PRIVATE KEY-----
EOM
chmod 400 ~/.ssh/id_rsa
ssh-keygen -F gitlab.com || ssh-keyscan gitlab.com >>~/.ssh/known_hosts
git config --global user.email "your-email@example.com"
git config --global user.name "Your Name"
test -e doge-detector || git clone git@gitlab.com:org-name/repo-name.git
cd repo-name
git pull
pip3 install -r requirements.txt
# ---- put below in a separate cell -------
git pull
git commit . -m 'updated notebook'
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment