-1

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:

error

  • 1
    You could try run tensorboard with the default port **6006** rather than _6060_. – n1colas.m Apr 17 '20 at 00:51
  • Appears you're new to Stack Overflow, so just a friendly reminder to click the checkmark on answers to the benefit community members that helped you out. – alexdlaird Aug 27 '20 at 16:51

1 Answers1

0

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.

alexdlaird
  • 1,174
  • 12
  • 34