0
0

More than 1 year has passed since last update.

AWS+Ray Dashboardポートフォワーディング

Last updated at Posted at 2022-01-24

概要

ローカルPCからWSLでAWS上にRay clusterを作成し、ポートフォワーディングでローカルPC上でRay Dashboardが見られるようにする。

環境

  • Windows10 Home
  • WSL Ubuntuディストリビューションをインストール済み
  • Python3、pip3、Ray、botoをインストール済み
  • ローカルPCの~/.awsディレクトリ配下のcredentialsにAccess key ID、Secret access keyを入力済み
  • 踏み台用EC2を作成済み(EC2はUbuntu)
  • 踏み台用EC2に割当てているセキュリティグループでSSHおよび8265番ポートを許可

手順

WSL Ubuntuを開き、下記コマンドを実行。

# 踏み台用EC2にSSH接続
$ ssh -i <踏み台サーバのpemファイル> ubuntu@<踏み台サーバのパブリックIP>

# 以下は踏み台用EC2で実行

# Ray cluster作成
$ ray up -n example-cluster --no-config-cache RayClusterConfig2.yaml

# Dashboard用のデフォルトポート8265番を踏み台用EC2の8265番ポートにフォワーディング
$ ray dashboard -p 8265 --remote-port 8265 RayClusterConfig2.yaml

別のWSL Ubuntuを開き、下記コマンドを実行。

# EC2の8265番ポートをローカルPCの8265番ポートにフォワーディング
$ ssh -i <踏み台サーバのpemファイル> ubuntu@<踏み台サーバのパブリックIP> -L 8265:localhost:8265

この状態でローカルPCのブラウザでhttp://localhost:8265/へアクセスするとRay dashboardが表示される。
image.png

0
0
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
0
0