Skip to content

Instantly share code, notes, and snippets.

@mrm8488
Last active September 19, 2022 09:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrm8488/0a252982460134249a93cc92ef01deca to your computer and use it in GitHub Desktop.
Save mrm8488/0a252982460134249a93cc92ef01deca to your computer and use it in GitHub Desktop.
Setup ngrok and run TensorBoard on Colab

Setup ngrok and run TensorBoard on Colab

!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
LOG_DIR = './log'
get_ipython().system_raw(
    'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'
    .format(LOG_DIR)
)
get_ipython().system_raw('./ngrok http 6006 &')
!curl -s http://localhost:4040/api/tunnels | python3 -c \
    "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment