You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download a file from a specified pod to local machine.
109
+
...
110
+
"""
111
+
try:
112
+
absolute_local_path=os.path.abspath(local_path)
113
+
114
+
click.echo(
115
+
f"Downloading file from pod {pod_id}:{remote_path} to {absolute_local_path}..."
116
+
)
117
+
withssh_cmd.SSHConnection(pod_id) asssh:
118
+
ssh.get_file(remote_path, absolute_local_path)
119
+
click.echo(f"File downloaded successfully to {absolute_local_path}.")
120
+
121
+
exceptExceptionase:
122
+
click.echo(f"Failed to download file: {e}", err=True)
123
+
click.echo(f"Ensure that the remote path exists on pod {pod_id}. \nAnd that the arguments are correct. \nFor example: runpod pod download 1234 /home/REMOTE_POD_PATH/file.txt /home/LOCAL_PATH/file.txt")
0 commit comments