Created
April 2, 2022 01:14
-
-
Save StevenSong/9251f4a8ee7a91624c6941018b54d685 to your computer and use it in GitHub Desktop.
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
# Launch jupyter notebook in a new tmux session for Colab to connect to | |
# https://research.google.com/colaboratory/local-runtimes.html | |
SESSION=colab | |
tmux new -d -s $SESSION | |
tmux send-keys -t $SESSION "jupyter notebook \ | |
--NotebookApp.allow_origin='https://colab.research.google.com' \ | |
--port=8888 \ | |
--NotebookApp.port_retries=0 \ | |
--no-browser" Enter | |
sleep 0.5 | |
URL=$(jupyter notebook list | grep 'http\S*' -o) | |
echo "$URL" | pbcopy | |
echo "$URL (copied to clipboard)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment