Code & Env Setup
Last updated
Last updated
In general, there are three workflows you can use to edit code and run it on the cluster:
Sign on through the Terminal and use an editor like emacs, vim, or nano to edit code directly in the terminal on the cluster.
Sign onto the cluster through an editor like VS code, and edit your files directly on the cluster compute.
Here, we walk through workflow #3. However, if you are running into latency problems interacting with the cluster through VS code directly, you may consider using workflow #2.
Clone your code repo.
Type the name of your repo.
Your repo will then be setup on the cluster.
You can use any environment management strategy you prefer. Our example below shows how to set up a conda environment.
Create a new environment.
Activate your environment.
Setup pip.
Install any packages you need to run your code. For example, if you have a requirements file:
Now you are ready to run your jobs. Before submitting a job to the cluster, make sure your environment is activated. Alternately, you can activate your environment in your job script.