https://github.com/aaronkollasch/o2-tools
Tools for use with Orchestra 2
https://github.com/aaronkollasch/o2-tools
jupyter o2 orchestra slurm ssh
Last synced: about 1 month ago
JSON representation
Tools for use with Orchestra 2
- Host: GitHub
- URL: https://github.com/aaronkollasch/o2-tools
- Owner: aaronkollasch
- License: mit
- Created: 2017-12-09T20:43:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-14T16:55:33.000Z (almost 4 years ago)
- Last Synced: 2025-02-25T13:13:12.765Z (over 1 year ago)
- Topics: jupyter, o2, orchestra, slurm, ssh
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# o2-tools
Tools for use with Orchestra 2, an HPC cluster managed by the HMS Resesarch Computing group.
- `jobinfo.sh` Get info on SLURM jobs.
- `jupyter_o2` Run jupyter over ssh and connect to it in your browser.
## jobinfo.sh
A bash script that provides information on your SLURM jobs.
Usage: `jobinfo` or `jobinfo `
Tab autocompletion of the job id is supported.
Source this script in your `~/.bashrc` file.
## jupyter_o2
A command line tool to launch and connect to a Jupyter session on O2.
(Now available as a package, [jupyter-o2](https://github.com/AaronKollasch/jupyter-o2))
Usage: `jupyter_o2 `
Example: `jupyter_o2 js123 notebook`
This will follow the procedure described on the
[O2 wiki](https://wiki.rc.hms.harvard.edu/display/O2/Jupyter+on+O2).
`jupyter_o2` will launch an X11-enabled SSH session with port forwarding,
start an interactive node running `jupyter notebook`,
SSH into that interactive node to allow requests to be forwarded,
and finally open the notebook in your browser.
### Configuration, etc.
#### Installation
Run jupyter_o2 with `./jupyter_o2` or copy the file into a folder within your `$PATH`.
#### Edit `.jupyter-o2.cfg`
- After running jupyter_o2 once, cancel at the PIN entry step using Ctrl-C.
A configuration file should have been created at `~/.jupyter-o2.cfg`. Edit this file.
- Change `MODULE_LOAD_CALL` and `SOURCE_JUPYTER_CALL` to commands that
activate your jupyter environment (more description in the file itself).
If one or both of these are not necessary, deleting everything after the `=`
will set it to an empty string.
- Choose a `DEFAULT_JP_PORT` that is open on your machine,
if the current default (`8887`) isn't already open.
The port can also be specified using `jupyter_o2 -p `.
#### Requirements
##### Packages
- Pexpect
##### Optional
- dnspython
- pyobjc-framework-Quartz
- pinentry (a command line tool)
jupyter_o2 has been tested with Python versions 2.7 and 3.6,
and Pexpect version 4.3. However, other versions may work just as well.
##### Operating system
`jupyter_o2` has been tested on MacOS. It may work on Linux and it would likely require
both Cygwin and a Cygwin version of Python to work on Windows (for Pexpect and SSH).