Created
April 28, 2021 06:16
-
-
Save codeperfectplus/68c12dd23973e350ab3592b2ed175cc2 to your computer and use it in GitHub Desktop.
run tensorboard on colab
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
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "Untitled9.ipynb", | |
"provenance": [] | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "Lhr4il6SHjvM" | |
}, | |
"source": [ | |
"!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip\n", | |
"!unzip -o ngrok-stable-linux-amd64.zip" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "LZdOiIQHHk3f" | |
}, | |
"source": [ | |
"LOG_DIR = model_dir\n", | |
"get_ipython().system_raw(\n", | |
" 'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'\n", | |
" .format(LOG_DIR))" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "Nkem7UsaHk5m" | |
}, | |
"source": [ | |
"get_ipython().system_raw('./ngrok http 6006 &')" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "lHUQqhyBHk9B" | |
}, | |
"source": [ | |
"!curl -s http://localhost:4040/api/tunnels | python3 -c \\\n", | |
" \"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])\"" | |
], | |
"execution_count": null, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment