i try launch tensorboard on colab, my code:
LOG_DIR = model_dir
get_ipython().system_raw(
'tensorboard --logdir {} --host 0.0.0.0 --port 6060 &'
.format(LOG_DIR)
)
get_ipython().system_raw('./ngrok http 6060 &')
! curl -s http://localhost:4040/api/tunnels | python3 -c \
"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"
two days ago everything worked, but now such an error:
The error linked suggests the port you're using is 6006
, but the code example you gave above has the port as 6060
. So may just be a typo there.
It's also possible you want a TCP tunnel, not an HTTP tunnel.
In either case, might I suggest trying something like pyngrok
to programmatically manage your ngrok
tunnel for you? Full disclosure, I am the developer of it. Here are the docs if you're interest.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.