#!/bin/bash SSH_KEY_PATH="$HOME/.ssh/gradio_key" if ! pgrep -u "$USER" ssh-agent > /dev/null; then eval "$(ssh-agent -s)" fi #ssh-add ~/.ssh/id_rsa # Define variables LOCAL_INPUT="results/models-parameters_list.txt" REMOTE_DIR="../../../projectnb/mlresearch/master" REMOTE_SCRIPT="$REMOTE_DIR/main.py" OUTPUT_FILE="results/evaluation_scores.txt" REMOTE_OUTPUT="$REMOTE_DIR/$OUTPUT_FILE" LOCAL_OUTPUT="results/evaluation_scores.txt" REMOTE_SERVER="vjain25@scc1.bu.edu" # Step 1: Transfer the text file to the SCC scp $LOCAL_INPUT $REMOTE_SERVER:$REMOTE_DIR # Step 2: Run the Python script on the SCC ssh $REMOTE_SERVER "python3 $REMOTE_SCRIPT > $REMOTE_OUTPUT" # Step 3: Transfer the result back to the local machine scp $REMOTE_SERVER:$REMOTE_OUTPUT $LOCAL_OUTPUT # Optional: Print message echo "File transfer and processing complete."