Skip to content

Instantly share code, notes, and snippets.

@tjyuyao
Last active November 10, 2020 08:36
Show Gist options
  • Save tjyuyao/c824f2efe2a07669150fd2430e297283 to your computer and use it in GitHub Desktop.
Save tjyuyao/c824f2efe2a07669150fd2430e297283 to your computer and use it in GitHub Desktop.
Project wise environment utils.
export PRJNAME="STViT"
export PRJ_ROOT="/home/hyuyao/prj/$PRJNAME"
export SRC_ROOT="$PRJ_ROOT/src/$PRJNAME"
export DATA_ROOT="$PRJ_ROOT/data"
export UTILS_ROOT="$PRJ_ROOT/utils" # put current env.sh to $PRJ_ROOT/utils
export PATH=$PATH:$UTILS_ROOT
alias cddata="cd $DATA_ROOT"
alias cdsrc="cd $SRC_ROOT && git config fetch.prune true"
alias cdutils="cd $UTILS_ROOT"
alias vimenv="vim $UTILS_ROOT/env.sh && . env.sh"
alias py="python3"
alias python="python3"
alias pipali="python3 -m pip install --user --prefer-binary -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com"
alias gst="git status"
alias gco="git checkout"
alias gcm="git commit"
alias gad="git add"
alias gpl="git pull --ff-only"
alias gps="git pull --ff-only && git push"
alias gft="git fetch"
unset CUDA_VISIBLE_DEVICES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment