Created
May 24, 2018 09:41
-
-
Save skystar-p/35c4873eb93ba563b98b5a17e3247e70 to your computer and use it in GitHub Desktop.
파이썬 스크립트를 바쿠스 GPU 서버에서 원격으로 돌리는 스크립트
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
#!/usr/bin/env bash | |
set -e | |
USERNAME=$USER | |
PWD=`pwd` | |
TARGETDIR=`basename $PWD` | |
DIR="/csehome/$USERNAME/.rpy/$TARGETDIR" | |
REMOTE="YOUR_HOST_NAME" | |
ssh $REMOTE -- rm -rf "$DIR" | |
ssh $REMOTE -- mkdir -p "$DIR" | |
rsync -avz "$PWD/" "$REMOTE:$DIR" | |
ssh -t $REMOTE -- "cd \"$DIR\" && /usr/bin/python3 $@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment