| | 3 | == Option 1 == |
| | 4 | === 1. Getting started === |
| | 5 | On Cypress, download the script. |
| | 6 | {{{ |
| | 7 | git clone https://gitlab.tulane.edu/fuji/launchjupyter.git |
| | 8 | }}} |
| | 9 | Copy LaunchJupyter.sh to the directory where you want to run the Jupyter Notebook, and edit it to customize the resource request to your needs. The default settings are shown below: |
| | 10 | {{{ |
| | 11 | #SBATCH --qos=normal # Quality of Service |
| | 12 | #SBATCH --partition=centos7 # partition |
| | 13 | #SBATCH --job-name=jupyter # Job Name |
| | 14 | #SBATCH --time=8:00:00 # WallTime |
| | 15 | #SBATCH --nodes=1 # Number of Nodes |
| | 16 | #SBATCH --ntasks-per-node=1 # Number of tasks (MPI processes) |
| | 17 | #SBATCH --cpus-per-task=20 # Number of threads per task (OMP threads) |
| | 18 | #SBATCH --mem=128000 # Request 128GB RAM |
| | 19 | }}} |
| | 21 | === 2. Submit a job === |
| | 22 | {{{ |
| | 23 | sbatch LaunchJupyter.sh |
| | 24 | }}} |
| | 25 | You can log out after submitting the job. You will receive an email once the job becomes active. |
| | 26 | |
| | 27 | 3. Read Jupyter Notebook Access Information Email |
| | 28 | |
| | 29 | Once the job becomes active, you will receive an email like below: |
| | 30 | {{{ |
| | 31 | Jupyter is running at cypress01-058 |
| | 32 | token: 38e3c6cdf28b9d691677882cfcf62fbd217d35e1de7cc909 |
| | 33 | |
| | 34 | Open a terminal and run the following command to create an SSH tunnel: |
| | 35 | ssh -L 8888:127.0.0.1:8888 -J [email protected] cypress01-058 |
| | 36 | |
| | 37 | Copy and paste below to your web browser to access Jupyter Notebook: |
| | 38 | http://127.0.0.1:8888/?token=38e3c6cdf28b9d691677882cfcf62fbd217d35e1de7cc909 |
| | 39 | }}} |
| | 40 | |
| | 41 | === 4. Create an SSH Tunnel === |
| | 42 | |
| | 43 | Open a terminal and run the command in the email, for example, |
| | 44 | {{{ |
| | 45 | ssh -L 8888:127.0.0.1:8888 -J [email protected] cypress01-058 |
| | 46 | }}} |
| | 47 | This will create an SSH tunnel from your local computer to the Cypress computing node. |
| | 48 | You may need to type a password to login Cypress. |
| | 49 | |
| | 50 | === 5. Access Jupyter Notebook === |
| | 51 | |
| | 52 | After logging in, keep the terminal open. Copy and paste the URL from the email into your web browser, or click the link to access the Jupyter Notebook. |
| | 53 | |
| | 54 | ==== When SSH connection lost ==== |
| | 55 | |
| | 56 | When your SSH tunnel session is disconnected, you can still access your Jupyter Notebook session as long as the job is still running. If this happens, recreate the SSH tunnel and reload your web browser or reconnect using the original URL. |
| | 57 | |
| | 58 | ==== Quit Jupyter Notebook Session ==== |
| | 59 | |
| | 60 | Click the “Quit” button located at the upper-right corner of the Jupyter Notebook interface. |
| | 61 | |
| | 62 | |
| | 63 | |
| | 64 | == Option 2 == |