Pycharm configure remote development and debugging remotely be tensorflow

Pycharm configure remote development and debugging remotely be tensorflow

After completion of each upload locally modify the code to the server, use the print center to monitor certain variables to debug it is too inconvenient, in order to facilitate remote debug, today pycharm configured to use a bit of remote functionality

After down when not matched find

tool

pycharm professional

Configure the server ssh service

File synchronization configuration

  • Open the panel

    Tools -> Deployment -> Configuration

  • Click +No. create a new profile, enter the configuration name Name, easily play, Typeselect SFTP, and then click OK.

  • Configure the server IP and port, authentication can choose a username and password, or use the private key file, putty also support the .ppk

  • Configure the root directory Root Pathis the root directory of the project file on a remote server, the configuration according to demand, for example,/home/zhangsan/workplace

  • Path mapping Mappings, Local Pathset the project directory under Windows, Deployment path on serverset to the directory of the remote server, set up according to their needs

  • Excluded Paths Setting does not need to synchronize directories, such as configuration files, data set, the checkpoint and the like.

  • Tools -> Deployment -> OptionsThe Create Empty directoriescheck mark, if the specified folder does not exist, will be created automatically.

Setting remote python interpreter

  • Menu bar File -> Settings, select enter the settings panel Project -> Project Interpreter, then to the right, click the little gear set.

  • Click Add Remote, choose SSH Credentials, Python interpreter pathchoose the interpreter they need the remote server.

  • When running the program, configuration Runtime just select the configuration of the interpreter will be able to remotely debug, and with the use of a local interpreter is similar, but also need to set environment variables.

  • Run -> Edit Configurations

In order to use the gpu tensorflow version, set the environment variable Environment variables, can be set here cuda9.0 /usr/local/cuda-9.0/lib64, similar needs of other environmental dependency for a method

If the execution .pytime of the need to pass command-line arguments, can Parametersfill in (just write --arg=valuepart), args string value of unquoted, plus the like will be considered part of the string, and this is directly in bash is not the same, no effect in bash quotes.

## file synchronization

tools -> Development -> Automatic Upload Set up automatic synchronization

After modifying the remote file can also be found in the upper right corner of the Edit panel upload button, after you modify remote files can also find the upload button in the upper right corner to edit panel, easy to use, see Resources

Reference material

http://www.voidcn.com/article/p-eafygntc-bbs.html

https://zhuanlan.zhihu.com/p/35067462

Guess you like

Origin www.cnblogs.com/QiLF/p/11580341.html