Last active
December 1, 2019 22:54
-
-
Save 05jd/0f5c92422ee2e9a9e7af767076fd0c55 to your computer and use it in GitHub Desktop.
Bash aliases for NYU clusters
This file contains 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
# Predefined Locations | |
VENV_HOME=$HOME/venv | |
ETC_HOME=$HOME/etc | |
## Virtual environments | |
venv() { | |
source $VENV_HOME/$1/bin/activate | |
} | |
create-venv() { | |
__my_cwd=`pwd` | |
cd $VENV_HOME | |
echo "Creating a new virtual environment at `pwd`" | |
virtualenv "$@" | |
cd $__my_cwd | |
unset __my_cwd | |
} | |
## Modules | |
load-modules () { | |
echo "Puring all modules previously loaded" | |
module purge | |
echo "Loading python-3.7.3 cuda-10.0 cudnn-v7.6" | |
module load python3/intel/3.7.3 cuda/10.0.130 cudnn/10.0v7.6.2.24 | |
} | |
## Slurm scripts | |
# Predefined Locations | |
VENV_HOME=$HOME/venv | |
ETC_HOME=$HOME/etc | |
## Virtual environments | |
venv() { | |
source $VENV_HOME/$1/bin/activate | |
} | |
create-venv() { | |
__my_cwd=`pwd` | |
cd $VENV_HOME | |
echo "Creating a new virtual environment at `pwd`" | |
virtualenv "$@" | |
cd $__my_cwd | |
unset __my_cwd | |
} | |
## Modules | |
load-modules () { | |
echo "Puring all modules previously loaded" | |
module purge | |
echo "Loading python-3.7.3 cuda-10.0 cudnn-v7.6" | |
module load python3/intel/3.7.3 cuda/10.0.130 cudnn/10.0v7.6.2.24 | |
} | |
## Slurm scripts | |
SJOB_DISPLAY_FORMAT="'%.9i %.9P %.7q %.20j %.10u %.8T %.10b %.6D %.6N %.10L'" # for more informative display | |
alias sjobs="squeue -u $USER -l --format=${SJOB_DISPLAY_FORMAT} $@" # to see my submitted jobs | |
alias sallcancle="scancel -t PENDING -u $USER" | |
alias get-run-template="cp $ETC_HOME/slurm/run_template.sub ./" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ㅎㅎ 감사합니다!!