Script to mount GPU server drive on Mac OS - requires SSHFS and MacFUSE
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
#!/bin/bash | |
remotedir="bob@192.168.1.199:/gpu" # TODO Add directory on the remote machine | |
mountdir="/Users/bob/gpu" # TODO Add local directory | |
echo "Mounting (${mountdir})..." | |
#Unmount if it's already mounted | |
if mount | grep "on $mountdir" > /dev/null; then | |
umount ${mountdir} | |
fi | |
#Now mount the remote file system | |
# (The -o workaround=rename -o noexec are used so kwrite can save files.) | |
sshfs -o ssh_command='ssh -AKXY' -o workaround=rename -o noexec -o idmap=user -o uid=$(id -u) -o gid=$(id -g) ${remotedir} ${mountdir} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment