Skip to content

Commit

Permalink
Posts
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitfarmer committed Apr 30, 2019
1 parent 5e0f5ae commit 69de366
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 134 deletions.
19 changes: 10 additions & 9 deletions docs/HPC/jupyter.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ description: "Setting up Jupyter Notebook Over Tunneling on HPC."

# Setting up Jupyter Notebook Over Tunneling on HPC.

*Note: The procedure below will run the jupyter notebook on an interactive node in an HPC.*
Below is an example protocol to run Jupyter notebook in an interactive node on a high-performance computer (HPCs). Most of the HPCs have their specialised way of interacting with them. Therefore, you may have to tweak this protocol as per your need. I would be happy to discuss and troubleshoot with you; contact me at [contact@rohitfarmer.dev](mailto:contact@rohitfarmer.dev). Any suggestions to augment this protocol with more advanced features are welcomed.

1. Ssh to hpc (Locus).
2. Claim an interactive node with qrsh.
3. Note the node name.
4. Run jupyter on the claimed node by `jupyter notebook --no-browser --ip='0.0.0.0'` or create an alias in your bashrc for a shortcut `alias jup='jupyter notebook --no-browser --ip='0.0.0.0''`.
5. On your own computer start another ssh session with tunnelling using the node name as noted above `ssh user@host -L8888:nodeName:8888 -N`. *You will not see any message this time, but if it's not throwing any error then it's probably running just fine.*
6. To avoid writing the code in line 5 everytime you tunnel you can use the shell script below.
1. SSH to the HPC.
2. Claim an interactive node (follow the standard procedure for your HPC, in my case it is `qrsh`).
3. Note the interactive node name.
4. Run Jupyter on the claimed interactive node by `jupyter notebook --no-browser --ip='0.0.0.0'` or create an alias in your bashrc for a shortcut. For example `alias jup='jupyter notebook --no-browser --ip='0.0.0.0''`.
5. On your computer start another SSH session with tunnelling using the interactive node name as noted above `ssh user@host -L8888:nodeName:8888 -N`. *The prompt probably won't return and you may also not see any message in your terminal, but as long as there is no error message, it's probably running fine.*
6. To avoid re-writing the code in step 5 every time you tunnel you can use the shell script below.

I named it as `jupssh`.
I named it `jupssh`.
```
#!/bin/sh
Expand All @@ -41,4 +41,5 @@ fi
ssh user@host -L8888:$1:8888 -N
```
7. Copy the URL that jupyter daemon generated in the step 4 and paste it in the browser on your own computer. URL should look something similar to `http://(nodeName or 127.0.0.1):8888/?token=3f7c3a8949b3fa1961c63653873fea075a93a29bffe373b5`. Choose either nodeName or 127.0.0.1 in the URL.

* Copy the URL that the Jupyter daemon has generated in step 4 and paste it in the browser on your computer. URL should look something similar to `http://(nodeName or 127.0.0.1):8888/?token=3f7c3a8949b3fa1961c63653873fea075a93a29bffe373b5`. Choose either nodeName or 127.0.0.1 in the URL.
82 changes: 0 additions & 82 deletions docs/Projects/H5N1.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/Projects/Projects.md

This file was deleted.

35 changes: 5 additions & 30 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,13 @@
layout: default
title: Home
nav_order: 1
description: "Software documention website for CHI."
description: "RF DOCS"
permalink: /
---

# Software Documentation for CHI's Computational Biology Group
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.niaid.nih.gov/chi/chi.github.niaid.nih.gov/commits/master) [![made-with-Markdown](https://img.shields.io/badge/Made%20with-Markdown-1f425f.svg)](http://commonmark.org) [![made-for-VSCode](https://img.shields.io/badge/Made%20for-VSCode-1f425f.svg)](https://code.visualstudio.com/) [![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/) [![powered by Jekyll](https://img.shields.io/badge/powered_by-Jekyll-yellow.svg)](https://jekyllrb.com)

All the members of the CHI's GitHub organisation account have the write access to this repository. It is encouraged to post documentation page(s) for any software that you write or a trick or tweak that you have found that might be relevant to other members of the CHI here. Large documentation that are specifically written for a major development project may be kept in their repositories.

For questions and suggestions please contact [Rohit Farmer](mailto:rohit.farmer@nih.gov).


[Back to CHI GitHub](https://github.niaid.nih.gov/chi){: .btn .btn-green }

## How-To Update CHI DOCS Website

* Clone the repository to your workspace.
```
https://github.niaid.nih.gov/chi/chi.github.niaid.nih.gov.git
```
* Navigate to docs folder inside the cloned repository.
```
cd chi.github.niaid.nih.gov/docs
```
* Navigate to a parent folder related to your doc if it already exists.
* Copy an existing .md file to a different name and change the contents accordingly.
* If a parent folder is not already present, then please create a folder and place a .md file with the same name as the folder inside it. For ease copy the folder associated .md file from an existing folder and change the contents accordingly.
* Update the repository with
```
git add .
git commit -m "message"
git push -u origin master
```
# Assorted & Ad Hoc Documentation for Some Commonly Used Software
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/rohitfarmer/docs/commits/master) [![made-with-Markdown](https://img.shields.io/badge/Made%20with-Markdown-1f425f.svg)](http://commonmark.org) [![made-for-VSCode](https://img.shields.io/badge/Made%20for-VSCode-1f425f.svg)](https://code.visualstudio.com/) [![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/) [![powered by Jekyll](https://img.shields.io/badge/powered_by-Jekyll-yellow.svg)](https://jekyllrb.com)

Assorted documentation for some commonly used software.

*Powered by [Just the Docs](https://github.com/pmarsceill/just-the-docs)*

0 comments on commit 69de366

Please sign in to comment.