作者:拐久了_618 | 来源:互联网 | 2023-09-11 15:45
Summary:
Prior to this change, TensorBoard would default to serving on the entire
local network; now, TensorBoard serves to the local machine only, and
the flag
can be used to dual-bind to IPv4 and IPv6 on the
entire local network (the previous default). See #2387 and comments
therein for details.
Test Plan:
On my Debian machine, running with
1
| strace -e trace=%network |
:
- running with no
flag:
- can connect to loopback on IPv4 only
- cannot connect over LAN
shows binding on
- a notice about
is printed to stderr
- running with
:
- running with
1
| --host='::1' |
:
- can connect to loopback on IPv6 only
- cannot connect over LAN
shows binding on
- running with
:
- can connect to loopback on IPv4 only
- can connect over LAN
shows binding on
- running with
1
| --host='::0' |
:
- can connect on both IPv4 and IPv6
- can connect over LAN
shows binding on
- running with
:
- can connect on both IPv4 and IPv6
- can connect over LAN
shows binding on
with an additional syscall
to
1
| setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [0], 4) |
to facilitate
the dual-binding, which is not present in any other tested case
In all cases, the printed serving URL (“TensorBoard x.y.z running at…”)
bears the exact
flag, or my full hostname if
was
given, or
if neither was given. In all cases, the URL is a
clickable link in my
.
Note that on my system dual binding to
works without an explicit
syscall—i.e.,
defaults to
—but this is not portable.
Connection testing was performed via
1 2 3 4 5 6 7 8
| shell
for ipv in 4 6; do
if curl -sfL -"${ipv}" localhost:6006/data/logdir >/dev/null; then
printf 'v%d OK\n' "${ipv}"
else
printf 'v%d FAIL\n' "${ipv}"
fi
done |
in all cases.
wchargin-branch: localhost-only
该提问来源于开源项目:tensorflow/tensorboard
That plan sounds good to me. Done; PTAL.