Skip to content
GitLab
  • Explore
  • Sign in
  • EDA Guides
  • eda-servers-guide
  • Wiki
  • remote code

remote code · Changes

Page history
Update remote code authored May 07, 2021 by Daniele Jahier Pagliari's avatar Daniele Jahier Pagliari
Hide whitespace changes
Inline Side-by-side
remote-code.md
View page @ b64d9b34
......@@ -24,22 +24,25 @@ The first step consists in creating a PyCharm Python project on your local machi
- Select `Project: <project-name>/Python Interpreter`, then click on the wheel icon and select `Add`.
- On the left, select `SSH Interpreter`, then create a new server configuration (if you don't have one already), specifying the hostname of the server (see ["Servers Information"](/servers)) and your username.
Figure 1 below shows an example for hostname `icaro.polito.it` and username `YOUR_ID`:
Figure 1 shows an example for hostname `icaro.polito.it` and username `YOUR_ID`.
Figure 1:
<img src="./figures/pycharm1.png" width="500">
Then, insert your authentication details to connect to the target server in the next dialog.
#### Set the Path of the Remote Python Executable
In the following dialog, you can select the path of the Python executable that you want to use in the remote server. You can do so by clicking on the folder icon highlighted in the top right of Figure 2 below:
In the following dialog, you can select the path of the Python executable that you want to use in the remote server. You can do so by clicking on the folder icon highlighted in the top right of Figure 2.
Figure 2:
<img src="./figures/pycharm2.png" width="500">
You can either set this path to the system-wide installation of your preferred Python version, or (more commonly) to a project-level virtualenv (see ["Python Virtual Environments"](/virtualenv)).
As shown in Figure 3 below, PyCharm will let you navigate graphically the directories of the server and select your preferred Python path. For virtualenvs, the executable path is `<virtualenv-root>/bin/python`.
As shown in Figure 3, PyCharm will let you navigate graphically the directories of the server and select your preferred Python path. For virtualenvs, the executable path is `<virtualenv-root>/bin/python`.
Figure 3:
<img src="./figures/pycharm3.png" width="300">
The figure shows an example for a virtualenv located in the user's home directory and named `py`.
......@@ -48,10 +51,11 @@ The figure shows an example for a virtualenv located in the user's home director
#### Setup Automatic Synchronization of Project Files
Lastly, you have to setup the automatic synchronization of Python files from your local machine to the remote server. In the window shown in Figure 2 above, select the option: "Automatically upload project files to the server". Then click on the folder icon at the right of "Sync Folders" and change the "Remote Path" to the location where you want your project files to reside on the server.
Lastly, you have to setup the automatic synchronization of Python files from your local machine to the remote server. In the window shown in Figure 2, select the option: "Automatically upload project files to the server". Then click on the folder icon at the right of "Sync Folders" and change the "Remote Path" to the location where you want your project files to reside on the server.
The figure below shows an example where a local project found in `~/Documents/code/my_project` is synchronized with the remote folder `/space/<username>/my_project`.
Figure 4 shows an example where a local project found in `~/Documents/code/my_project` is synchronized with the remote folder `/space/<username>/my_project`.
Figure 4:
<img src="./figures/pycharm4.png" width="500">
......@@ -65,7 +69,9 @@ Notice that remote execution is interrupted if you lose your internet connection
#### Accessing Remote Files
Although project files are synchronized automatically, PyCharm also lets you manually browse the remote host in order, for example, to download or open result files, plots, etc.
To do so, simply select `Tools/Deployment/Browse Remote Host`.
Clone repository
Home

Servers Information
Accounts
Connecting to the Servers
Storage Management and Quotas
Monitoring Resources
Software, Libraries and Data
  • Using Custom Software
  • Software Modules on Philae
  • Remote Code Deployment
  • Python Virtual Environments
  • EDA Technology Libraries
  • Shared Datasets
Miscellaneous Settings
  • Setting CUDA Drivers
  • Choosing which GPU to Use
  • Limiting GPU Memory
  • Limiting CPU Threads
Gitlab

Sidebar