Use 3 terminals.
The shell machine assignments used in the following "procedures" are as follows.
--[username @ es1 ~] $
: ABCI's interactive shell (where you log in and enter first)
--[username @ g0001 ~] $
: ABCI compute node (where you can enter with qrsh)
--[username @ local ~] $
: Local shell
Run compute node with qrsh
[username@es1 ~]$ GROUP=YOUR_GROUP_NAME
[username@es1 ~]$ qrsh -g $GROUP -l rt_F=1 -l h_rt=01:00:00
2. Get the host name
Make a note of the acquired value as you will need it later.
```bash
[username@g0001 ~]$ hostname
g0001.abci.local
```
3. Run jupyter-notebook
```bash
[username@g0001 ~]$ jupyter notebook --ip=`hostname` --port=8888 --no-browser
```
4. Port forwarding on your local PC
```bash
[username@local ~]$ username=your_user_name_in_abci
[username@local ~]$ identity_file=~/.ssh/your_identity_file
[username@local ~]$ ssh -i $identity_file -L 10022:es:22 -l $username as.abci.ai
Welcome to ABCI access server.
Please press any key if you disconnect this session.
```
5. Create an SSH tunnel in another terminal
Note that the host name obtained in 2 is used.
```bash
[username@local ~]$ qrsh_host_name=g0001
[username@local ~]$ username=your_user_name_in_abci
[username@local ~]$ identity_file=~/.ssh/your_identity_file
[username@local ~]$ ssh -N -L 8888:$qrsh_host_name:8888 -l $username -i $identity_file -p 10022 localhost
```
Access `http://127.0.0.1:8888/?token=~` displayed in 6.3
Since the local URL is displayed in the shell of the calculation node running jupyter-notebook, when you access it, Jupyter-notebook opens in the browser.
## reference
-[ABCI User Guide: Launching Jupyter Notebook](https://docs.abci.ai/ja/tips/jupyter-notebook/#start-jupyter-notebook)
Recommended Posts