From 70af689fd9ec9b5d24df296e5a0ca3ba69f19f1e Mon Sep 17 00:00:00 2001 From: patmjen <patmjen@dtu.dk> Date: Thu, 3 Nov 2022 17:21:24 +0100 Subject: [PATCH] Add hint for changed port --- HPC_Python_Guide.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/HPC_Python_Guide.md b/HPC_Python_Guide.md index 3924b7a..23fedea 100644 --- a/HPC_Python_Guide.md +++ b/HPC_Python_Guide.md @@ -135,8 +135,9 @@ You should now be able to install packages with pip install <PACKAGE> as normal. 1. Open a terminal on the cluster, either through ThinLinc or ssh. -2. Make sure you are on a real node as described in section I. - If you are using ssh, it is good to start a tmux session by running: +2. Call `sxm2sh` or `linuxsh`, as described in section I, so you are not on a login node. + +3. Start a tmux session by running: ``` tmux ``` @@ -147,14 +148,14 @@ You should now be able to install packages with pip install <PACKAGE> as normal. > ``` > in a terminal on the cluster. -3. Take note of the node's hostname. You can see this by running: +4. Take note of the node's hostname - you will need it later. You can see this by running: ``` echo $HOSTNAME ``` -4. Navigate to your project folder and activate the virtualenv. +5. Navigate to your project folder and activate the virtualenv. -5. Start a Jupyter lab or Jupyter notebook server by entering one of the following: +6. Start a Jupyter lab or Jupyter notebook server by entering one of the following: ``` jupyter lab --port=44000 --ip=$HOSTNAME --no-browser jupyter notebook --port=44000 --ip=$HOSTNAME --no-browser @@ -168,21 +169,23 @@ You should now be able to install packages with pip install <PACKAGE> as normal. or http://127.0.0.1:44000/lab?token=401720c25a3e9411a5f28d9015591b19a9032fc90989ffa0 ``` -6. Open a terminal on your own computer and run +7. Open a terminal on your own computer and run ``` ssh <USERNAME>@login2.hpc.dtu.dk -g -L44000:<HOSTNAME>:44000 -N ``` - where `<USERNAME>` is your DTU user name and `<HOSTNAME>` is the hostname you found in step 3. + where `<USERNAME>` is your DTU user name and `<HOSTNAME>` is the hostname you found in step 4. This should prompt you for your DTU password, _**and then NOTHING SHOULD HAPPEN**_. -7. Open your browser and enter the URL printed in step 5 that starts with `127.0.0.1` +8. Open your browser and enter the URL printed in step 5 that starts with `127.0.0.1` (e.g. `http://127.0.0.1:44000/lab?token=401720c25a3e9411a5f28d9015591b19a9032fc90989ffa0`). This should open the Jupyter interface. Any commands you run will be executed on the HPC cluster. - > **NOTE:** If no URL beginning with `127.0.0.1` was printed in step 5, change the first part + > **Troubleshooting:** If no URL beginning with `127.0.0.1` was printed in step 5, change the first part > manually to `127.0.0.1` before entering it in your browser. In the example from step 5, you - > would change `n-62-20-9` to `12.0.0.1`. + > would change `n-62-20-9` to `127.0.0.1`. + + > **Troubleshooting:** If the number after `htttp://127.0.0.1:` is not `44000`, Jupyter selected another port. In this case, redo step 7 where 44000 is replaced with the number from the URL printed by Jupyter. This happens if the port we request with `--port=44000` is not available. If you close your browser, you can reconnnect by entering the URL again. If you lose your internet connection, you can reconnect by repeating steps 5 and 6. -- GitLab