Skip to content

Instantly share code, notes, and snippets.

@michael-ford
Created July 31, 2024 17:34
Show Gist options
  • Save michael-ford/8264ae57370e6b1da80f81145340623c to your computer and use it in GitHub Desktop.
Save michael-ford/8264ae57370e6b1da80f81145340623c to your computer and use it in GitHub Desktop.
Script to start jupyter session on biowulf
#!/bin/bash
port=$(/usr/local/slurm/bin/reconnect_tunnels --list 2> /dev/null)
tmux new-session -d -s jupyter
tmux send-keys -t jupyter "cd /data/$USER; jupyter lab --no-browser --port=$port" C-m
tmux new-session -d -s main
sleep 5
tmux send-keys -t main "cd-data; get-jupyter-url.sh" C-m
tmux attach -t main
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment