- Create a public-private key pair between your local machine and Edlab.
- On the client (local) machine, run the following command:
ssh-keygen -t rsa
- After this, you will be given the following prompt:
Enter file in which to save the key (/home/demo/.ssh/id_rsa):
- Press Enter here.
- After this you will be given the following prompt:
Enter passphrase (empty for no passphrase):
- Press Enter here.
- Copy the public key to the remote machine. For this you will need the ssh-copy-id command. It is installed by default in most linux variants. It won’t be installed on a Mac. Use the following command to install it if you are on a Mac:
brew install ssh-copy-id
- Copy the public key using the following command:
where <username> is your edlab username. Alternatively, you can also use the following command to paste the key:
ssh-copy-id <username>@elnux.cs.umass.edu
cat ~/.ssh/id_rsa.pub | ssh<username>@elnux.cs.umass.edu "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys"
- Enter your password, if prompted.
- Now you should be able to login without using a password. Please test that you are able to do so before running the application.
Create a public-private key pair between Edlab and Edlab:
- Log in to Edlab as follows:
ssh elnux1.cs.umass.edu
- Follow the steps from 1 (previous step) with the remote directory as elnux2.cs.umass.edu(This is done to enable respawning of servers)
- Clone the git repo on your edlab machine as well as your local machine.
- Inside the src/ directory in EdLab machine, run the following command:
source venv/bin/activate pip3 install -r requirements.txt --user
In the run_pygmy.sh script in the local machine, make the following changes:
- In the <user> variable, assign your edlab username.
- In the <remote_path> give the remote directory where you cloned the repo. This can be done using the pwd command. Make sure to give a ‘/’ at the end of the path.
Example: /nfs/elsrv4/users1/grad/aayushgupta/cs677/
- Run the script run_pygmy.sh on your local machine using the following commands:
chmod +x run_pygmy.sh ./run_pygmy.sh