Access Tensorboard on AWS

I am trying to access Tensorboard on AWS. Here is my setup:

  • Tensorboard: tensorboard --host 0.0.0.0 --logdir=train :

Launch TensorBoard b'39 'on port 6006 (you can go to http://172.31.18.170:6006 )

  • AWS Security Groups (in):
    • HTTPS TCP 443 0.0.0.0/0
    • Custom_TCP TCP 6006 0.0.0.0/0

However, I do not see anything connected to ec2-blabla.us-west-1.compute.amazonaws.com:6006 , I basically can’t connect.

Do you have any ideas?

+6
source share
6 answers

A quick (but unsafe) solution:

Launch:

 tensorboard --logdir=/training --host=0.0.0.0 --port=8080 

on your AWS instance.

Make sure that both inbound and outbound rules on the AWS console (control center) are as unlimited as possible (allow all types, all ports, etc.). However, keep in mind that this solution is not recommended for environments requiring security (in our case, we did not consider the safety of NN training).

Trying to explain why this works: when the policy is set as described, AWS still seems to block incoming / outgoing connections on the standard tensor port 6006. This does not seem to apply to port 8080.

Longer (but safer) solution: See: https://blog.altoros.com/getting-started-with-a-cpu-enabled-tensorflow-instance-on-aws.html (provides explanations of the correct installation of ports on AWS )

+3
source

I managed to configure it as follows:

  • Go to the security groups in the ec2 console:

  • Select the appropriate security group in the table, click "Edit."

  • Add a rule like this:

  • Run tensogram: tensorboard --logdir tf_summary/ --port 8080

  • Find out the URL of your instance and visit http://yourURL:8080

+2
source

You can use ssh tunneling technique.

In the terminal you can write:

 ssh -i /path/to/your/AWS/key/file -NL 6006:localhost:6006 user@host 

where user and host is your aws ec2 user and specific instance.

After that, you can go to http: // localhost: 6006 /

+1
source
  • Run the tensogram in your ec2 terminal (you can configure logdir and port)

     tensorboard --logdir=data/model --port=8080 
  • Find your public ip address (abcd) on workstations by visiting http://ip4.me/

  • Access the security group configuration assigned to your EC2 and add a custom TCP rule to your inbound traffic.

    Security group inbound traffic configuration> </a> </p> </li> <li> <p> Outbound must be configured to allow traffic from the tensor port. (In this case, 8080). Or you just allow all outgoing traffic from your EC2 instance. </P> <pre> <code> Protocol Port Range Destination Description All traffic All All 0.0.0.0/0 </code></pre> </li> <li > <p> Use your public DNS to access the tensogram from your workstation. </p> <p> <a href = http://ec2-xx-xxx-xx-xx.compute-1.amazonaws.com:8080/

+1
source

Just run the tensogram without the host parameter (which creates restrictions)

 tensorboard --logdir XXX --port 6006 
0
source

I suffered from the same problem for several days.

Fortunately, I solved this problem by adding the AWS Outbound Rule rule, as if I added AWS Inbound Rules.


Regardless of this setting, it works at home. The same error still occurs only in the company.

-one
source

Source: https://habr.com/ru/post/1015032/


All Articles