Skip to content

Commit

Permalink
reorder ssh command
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmin17 committed Nov 28, 2023
1 parent 66248d5 commit 9823211
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ml_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
echo "${{ secrets.PEM }}" > key.pem
set -x
chmod 600 key.pem
scp -i ./"key.pem" ./recommendation_pipeline.sh -o StrictHostKeyChecking=no ec2-user@${{ secrets.CLOUD_URL }}:~
scp -i ./"key.pem" -o StrictHostKeyChecking=no ./recommendation_pipeline.sh ec2-user@${{ secrets.CLOUD_URL }}:~
- name: Sync ML Code
run: |
set +x
echo "${{ secrets.PEM }}" > key.pem
set -x
chmod 600 key.pem
rsync -avz ./recommend/ -o StrictHostKeyChecking=no ec2-user@${{ secrets.CLOUD_URL }}:/recommend/
rsync -avz -e "ssh -o StrictHostKeyChecking=no -i ./key.pem" ./recommend/ ec2-user@${{ secrets.CLOUD_URL }}:/recommend/
- name: Restart ML Container & Mount Code
run: |
Expand Down
6 changes: 3 additions & 3 deletions recommend/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
set -e

# Set environment variables for S3 bucket and file paths
# S3_BUCKET=${S3_BUCKET}
# EVENT_FILE="eventData.csv"
# USER_FILE="userData.csv"
S3_BUCKET=${S3_BUCKET}
EVENT_FILE="eventData.csv"
USER_FILE="userData.csv"

# Use AWS CLI to download the CSV file from S3
aws s3 cp s3://${S3_BUCKET}/${EVENT_FILE} /app/
Expand Down

0 comments on commit 9823211

Please sign in to comment.