掛載遠(yuǎn)程服務(wù)器硬盤&在pycharm上配置遠(yuǎn)程連接

掛載遠(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
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容