Skip to content
Snippets Groups Projects
Commit c16ac615 authored by las1g21's avatar las1g21
Browse files

Can send files to Iridis

parent 795efd19
No related branches found
No related tags found
1 merge request!9GDP 4.4.5
...@@ -2,6 +2,7 @@ import paramiko ...@@ -2,6 +2,7 @@ import paramiko
from dotenv import load_dotenv from dotenv import load_dotenv
from scp import SCPClient from scp import SCPClient
import os import os
import subprocess
load_dotenv() load_dotenv()
hostname = os.getenv("HOSTNAME") hostname = os.getenv("HOSTNAME")
...@@ -46,18 +47,22 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path): ...@@ -46,18 +47,22 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path):
client.connect(hostname, username=username, password=password) client.connect(hostname, username=username, password=password)
# Execute commands on the server # 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 the output of the command
print(stdout.read()) print(stdout.read())
# Close the SSH connection # Close the SSH connection
client.close() client.close()
else: else:
return False 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment