Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IPython/Jupyter notebook on Comet
#!/bin/bash
#SBATCH --nodes 1
#### Choose either 1 entire Comet node or just 1 core
#### 1 core is charged 1/24th of a full node but only
#### has ~5GB of RAM.
#### Choose by leaving only 1 # before SBATCH
#### entire node (128GB RAM)
####SBATCH --ntasks-per-node 24
####SBATCH --partition compute
#### just 1 core (5.3GB RAM)
#SBATCH --ntasks-per-node 1
#SBATCH --partition shared
#SBATCH --time 00:30:00
#SBATCH --job-name notebook
#SBATCH --output notebook.log
# choose your own unique port between 8000 and 9999
NOTEBOOKPORT=8181
# setup tunnel between computing and login node
ssh -N -f -R $NOTEBOOKPORT:localhost:$NOTEBOOKPORT $SLURM_SUBMIT_HOST
# launch the notebook
ipython notebook --port=$NOTEBOOKPORT --no-browser
ssh -f -N -L 8181:localhost:8181 YOURUSERNAME@comet-ln$1.sdsc.edu
@zonca

This comment has been minimized.

Copy link
Owner Author

zonca commented Sep 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.