プリンキピア

第23章付録:深層学習のための道具

23.3.4. Running the Jupyter Notebook remotely23.3.4 Jupyter Notebookをリモートで実行する

To run the Jupyter Notebook remotely you need to use SSH port forwarding. After all, the server in the cloud does not have a monitor or keyboard. For this, log into your server from your desktop (or laptop) as follows:
英語のヒント
Jupyter Notebookをリモートで実行するには、SSHのポートフォワーディングを使う必要がある。結局のところ、クラウドのサーバにはモニタもキーボードもない。そのため、デスクトップ(あるいはラップトップ)から次のようにサーバにログインする。
# This command must be run in the local command line
ssh -i "/path/to/key.pem" ubuntu@ec2-xx-xxx-xxx-xxx.y.compute.amazonaws.com -L 8889:localhost:8888
Next, go to the location of the downloaded code of this book on the EC2 instance, then run:
英語のヒント
次に、EC2のインスタンスで、ダウンロードした本書のコードの場所に行き、次を実行する。
conda activate d2l
jupyter notebook
Fig. 23.3.12 shows the possible output after you run the Jupyter Notebook. The last row is the URL for port 8888.
英語のヒント
図23.3.12は、Jupyter Notebookを実行した後のありうる出力を示している。最後の行はポート8888のURLである。
Fig. 23.3.12図23.3.12
Output after running the Jupyter Notebook. The last row is the URL for port 8888.
英語のヒント
Jupyter Notebookを実行した後の出力。最後の行はポート8888のURLである。
Since you used port forwarding to port 8889, copy the last row in the red box of Fig. 23.3.12, replace “8888” with “8889” in the URL, and open it in your local browser.
英語のヒント
ポート8889へのポートフォワーディングを使ったので、図23.3.12の赤い枠の中の最後の行をコピーし、URLの「8888」を「8889」に置き換えて、ローカルのブラウザで開く。