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

remote code · Changes

Page history
Update remote code authored Oct 04, 2023 by Daniele Jahier Pagliari's avatar Daniele Jahier Pagliari
Show whitespace changes
Inline Side-by-side
remote-code.md
View page @ a65f8fea
# Remote Code Deployment
Many modern IDEs offer ways to setup your project so that you can:
- Use your local computer for editing source code, debugging, etc.
- Run (deploy) your program on a remote machine, such as one of the servers.
You are welcome and encouraged to use any such kind of deployment mechanism that is compatible with ssh (i.e., the main mechanism used to access the server, see ["Connecting to the Servers"](/connection).
For people with access to `icaro.polito.it`, this automatic remote deployment is also helpful for working in folders that are periodically erased (see ["Storage Management and Quotas"](/storage)). In fact, most IDEs will automatically re-upload the local copy of your files to the remote machine if they detect that some files have been deleted.
The rest of this page contains a short guide on how to setup remote deployment on the [PyCharm](https://www.jetbrains.com/pycharm/) Python IDE by JetBrains. Instructions are similar for other JetBrain tools. If you use a different IDE, it would be very helpful if you could prepare a similar guide and share it with the sysadmins to include in this page.
## Remote Deployment with PyCharm
......@@ -28,7 +27,7 @@ Figure 1 shows an example for hostname `icaro.polito.it` and username `YOUR_ID`.
**Figure 1:**
<img src="./figures/pycharm1.png" width="500">
![](./figures/pycharm1.png)
Then, insert your authentication details to connect to the target server in the next dialog.
......@@ -38,7 +37,7 @@ In the following dialog, you can select the path of the Python executable that y
**Figure 2:**
<img src="./figures/pycharm2.png" width="500">
![](./figures/pycharm2.png)
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)).
......@@ -46,11 +45,11 @@ As shown in Figure 3, PyCharm will let you navigate graphically the directories
**Figure 3:**
<img src="./figures/pycharm3.png" width="300">
![](./figures/pycharm3.png)
The figure shows an example for a virtualenv located in the user's home directory and named `py`.
**IMPORTANT:** since the virtualenv is not part of your Python project, differently from your source files, it will not be synchronized automatically between local and remote machine by PyCharm. This means that you should create your virtualenvs in a folder that will *not* be deleted automatically. This is especially important for servers other than philae, where some folders are periodically erased (see ["Storage Management and Quotas"](/storage)).
**IMPORTANT:** since the virtualenv is not part of your Python project, differently from your source files, it will not be synchronized automatically between local and remote machine by PyCharm.
#### Setup Automatic Synchronization of Project Files
......@@ -60,10 +59,9 @@ Figure 4 shows an example where a local project found in `~/Documents/code/my_p
**Figure 4:**
<img src="./figures/pycharm4.png" width="500">
![](./figures/pycharm4.png)
**IMPORTANT:** the Python virtualenv does *not* need to be in the same folder as your project. In fact, in many cases it could be better to have them in separate folders, for the reasons explained below. For instance, on `icaro.polito.it`, it may be convenient to have your virtualenv in `/home` and your project in `/space`
**IMPORTANT:** the Python virtualenv does _not_ need to be in the same folder as your project. In fact, in many cases it could be better to have them in separate folders, for the reasons explained below. For instance, on `icaro.polito.it`, it may be convenient to have your virtualenv in `/home` and your project in `/space`
#### Finish the Interpreter Setup
......@@ -80,5 +78,3 @@ To do so, simply select `Tools/Deployment/Browse Remote Host`.
#### Credits
Thanks to Giovanni Zara for providing the first draft of this guide.
\ No newline at end of file
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 Up CUDA Libraries
  • Choosing which GPU to Use
  • Limiting GPU Memory
  • Limiting CPU Threads
Gitlab

Sidebar