Last active
September 19, 2023 20:31
-
-
Save hiraksarkar/64755104c02a20afe1cd7eb29e652212 to your computer and use it in GitHub Desktop.
cycles slurm job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#SBATCH --mincpus 32 | |
#SBATCH --mem 100G | |
#SBATCH --time 6-23:59:00 | |
#SBATCH --job-name jupyterlab | |
#SBATCH --gres=gpu:1 | |
#SBATCH --mail-type=begin # send email when job begins | |
#SBATCH --mail-type=end # send email when job ends | |
#SBATCH [email protected] | |
#SBATCH --output jupyter_logs/jupyter-notebook-%J.log | |
# get tunneling info | |
# get tunneling info | |
XDG_RUNTIME_DIR="" | |
port=$(shuf -i10001-20000 -n1) | |
node=$(hostname -s) | |
user=$(whoami) | |
cluster="cycles" | |
# print tunneling instructions jupyter-log | |
echo -e " | |
MacOS or linux terminal command to create your ssh tunnel | |
ssh -N -L ${port}:${node}:${port} ${user}@${cluster}.cs.princeton.edu | |
Windows MobaXterm info | |
Forwarded port:same as remote port | |
Remote server: ${node} | |
Remote port: ${port} | |
SSH server: ${cluster}.cs.princeton.edu | |
SSH login: $user | |
SSH port: 22 | |
Use a Browser on your local machine to go to: | |
localhost:${port} (prefix w/ https:// if using password) | |
" | |
# load modules or conda environments here | |
# uncomment the following two lines to use your conda environment called notebook_env | |
module load gurobi | |
source /n/fs/ragr-data/users/hirak/environments/mambaforge/bin/activate base | |
conda activate py390 | |
# conda activate spagcn | |
# conda activate py-stagate | |
cd /n/fs/ragr-research/users/hirak/Projects/niche_project/COMMOT_paper_data | |
# DON'T USE ADDRESS BELOW. | |
# DO USE TOKEN BELOW | |
jupyter lab --no-browser --port=${port} --ip=${node} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment