LoginSignup
5
2

More than 3 years have passed since last update.

TensorBoard at http://localhost:6006/

Last updated at Posted at 2020-10-11
$ tensorboard --logdir ./

と打ち、

TensorBoard 2.2.1 at http://localhost:6006/ (Press CTRL+C to quit)

が出力されたが、
http://localhost:6006/tensorboardが見れないとき。

環境

自分のPCはwindows
リモートサーバーはlinux

経緯

puttyを使いリモートログインをしてサーバーにログインした。
そこでtensorboardを使った。
アウトプットされたサイトにアクセスできなかった

解決策前提

userremoteサーバーserverを使ってリモートログインする。

remote@server's password:passward

現在のディレクトリに入っているtensorboardを起動。

[remote@server ~]$ tensorboard --logdir ./
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.2.1 at http://localhost:6006/ (Press CTRL+C to quit)

解決策

あなたのPCのターミナルを開く。
ssh.jpg

useruserのコマンドプロンプトを開く。このuser名は例。
そして以下のように入力する。

C:\Users\user>ssh -L (ポート番号):localhost:6006 (リモート側のuser名)@(リモート側のサーバーのIPアドレス)

(ポート番号)には49513~65535のような空いているポート番号。
(リモート側のuser名)remoteのような名前
(リモート側のサーバーのIPアドレス)987.098.082.99 のような数字

上記のコードをコマンドプロンプトに打ち込むことで、
http://localhost:(ポート番号)/
からtensorflowが見れる。

私の場合

C:\Users\user>ssh -L 49513:localhost:6006 remote@987.098.082.99

http://localhost:49513/からtensorboardが見れる。

補足
(リモート側のサーバーのIPアドレス)は非常にプライベートな数字である。
もし自分のサーバーでない他のサーバーにリモートログインするとき、(リモート側のサーバーのIPアドレス)は見れないようになっている時がある。
そのときは、そのサーバーの管理者に(リモート側のサーバーのIPアドレス)を聞こう。

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2