掛載遠(yuǎn)程服務(wù)器硬盤
following this link: https://wxnacy.com/2018/04/12/osx-user-sshfs/
配置sshfs:
brew cask install osxfuse
brew install sshfs
但是我在運(yùn)行命令時(shí),遇到了如下問題:
brew install sshfs
==> Installing dependencies for sshfs: python and glib
==> Installing sshfs dependency: python
Error: Xcode alone is not sufficient on High Sierra.
Install the Command Line Tools:
xcode-select --install
xuwenjiadeMBP:MPI-remote xuwenjia$ xcode-select --install
xcode-select: note: install requested for command line developer tools
xuwenjiadeMBP:MPI-remote xuwenjia$
于是我運(yùn)行了 xcode-select --install
等軟件安裝完成之后又運(yùn)行了brew install sshfs
結(jié)果又出錯(cuò)。。。
==> Pouring python-3.7.7.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
rm '/usr/local/bin/2to3'
To force the link and overwrite all conflicting files:
brew link --overwrite python
To list all files that would be deleted:
brew link --overwrite --dry-run python
Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.6/bin/2to3
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.6/bin/idle3
運(yùn)行了rm '/usr/local/bin/2to3',之后繼續(xù)運(yùn)行brew install sshfs
然后就安裝成功啦!
掛載硬盤:
sshfs user@hostname:/absolute/path/to/document local-file
在pycharm上設(shè)置遠(yuǎn)程調(diào)試
我首先需要進(jìn)行端口二次映射,然后建立development,最后設(shè)置遠(yuǎn)程調(diào)試的interpreter
端口二次映射
因?yàn)槲遗艽a需要登錄contact server,再登錄GPU server。所以這里做一個(gè)端口映射,將自己主機(jī)上的端口映射到GPU server上。
ssh -fNL 6608:[GPU server]:22 user_name@contact server
例如:ssh -fNL 6608:d2volta10:22 wexu@contact.mpi-inf.mpg.de
建立development
如下圖:

development
設(shè)置interpreter
following this link:
https://zhuanlan.zhihu.com/p/38591832
總體上差不多,這是最后的結(jié)果:

屏幕快照 2020-03-18 下午8.58.40.png