From c16ac6153c04e6bd414190d17cd0f12ce37ee0b1 Mon Sep 17 00:00:00 2001
From: las1g21 <las1g21@soton.ac.uk>
Date: Tue, 3 Dec 2024 15:36:13 +0000
Subject: [PATCH] Can send files to Iridis

---
 scripts/scene_completion.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/scripts/scene_completion.py b/scripts/scene_completion.py
index 64f23b7..5cb59b6 100644
--- a/scripts/scene_completion.py
+++ b/scripts/scene_completion.py
@@ -2,6 +2,7 @@ import paramiko
 from dotenv import load_dotenv
 from scp import SCPClient
 import os
+import subprocess
 
 load_dotenv()
 hostname = os.getenv("HOSTNAME")
@@ -46,18 +47,22 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path):
         client.connect(hostname, username=username, password=password) 
         
         # Execute commands on the server 
-        stdin, stdout, stderr = client.exec_command("ls -l") 
+        stdin, stdout, stderr = client.exec_command("cd mona/MDBNet360_GDP/")
+        stdin, stdout, stderr = client.exec_command("module load conda")
+        stdin, stdout, stderr = client.exec_command("source activate")
+        stdin, stdout, stderr = client.exec_command("conda activate sscenv") 
+        stdin, stdout, stderr = client.exec_command("cd mona/MDBNet360_GDP/sbatch --partition=ecsstudents --account=ecsstudents run_obj_job.sh")
         
-        print("AHAHAHAHAHAHAH\n")
 
         # Print the output of the command 
         print(stdout.read()) 
         
         # Close the SSH connection 
         client.close() 
-        
+
     else:
         return False
 
 
-
+out = send_files("C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Listening\\shifted-disparity.png", "C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Listening\\shifted_t.png")
+print(out)
\ No newline at end of file
-- 
GitLab