forked from amiralansary/rl-medical
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtransfer.py
24 lines (15 loc) · 817 Bytes
/
transfer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import subprocess
import glob
username = '...' # <--- CHANGE HERE
subprocess.run(["scp", "-pr", "./call_gpu_copy.py", username + "@gpucluster.doc.ic.ac.uk:Documents/rl-medical"])
files = glob.glob("./examples/LandmarkDetection/DQN/*.py")
for file in files:
subprocess.run(["scp", "-pr", file, username + "@gpucluster.doc.ic.ac.uk:Documents/rl-medical/examples/LandmarkDetection/DQN"])
sshProcess = subprocess.Popen(['ssh',
username + "@gpucluster.doc.ic.ac.uk"],
stdin=subprocess.PIPE,
stdout = subprocess.PIPE,
universal_newlines=True,
bufsize=0)
sshProcess.stdin.write(f"python3 Documents/rl-medical/call_gpu_copy.py\n")
sshProcess.stdin.close()