Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ajithvcoder committed Nov 28, 2024
1 parent 1d04589 commit 8bab8c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/ec2-pipeline-end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,24 +210,32 @@ jobs:
- name: Read best checkpoint file name
id: read_checkpoint
run: |
checkpoint_file=$(head -n 1 ./model_storage/best_model_checkpoint.txt)
set +e
echo "checking workspace files"
ls -a /workspace/ || true
echo "checking workspace model_storage files"
ls -a /workspace/model_storage || true
echo "checking workspace gradio_demo files"
ls -a /workspace/gradio_demo || true
checkpoint_file=$(head -n 1 /workspace/model_storage/best_model_checkpoint.txt) || true
echo "CHECKPOINT_FILE=$checkpoint_file" >> $GITHUB_ENV
- name: Upload checkpoint to S3
run: |
checkpoint_path="${{ env.CHECKPOINT_FILE }}" # Use the checkpoint path from the file
bucket_name="mybucket-emlo-mumbai" # Change to your S3 bucket name
s3_key="session-10-checkpoint/${{ needs.launch-runner.outputs.commit_id }}/$(basename "$checkpoint_path")" # Define S3 key
echo "Uploading $checkpoint_path to s3://$bucket_name/$s3_key"
aws s3 cp "$checkpoint_path" "s3://$bucket_name/$s3_key"
checkpoint_path="${{ env.CHECKPOINT_FILE }}" # Use the checkpoint path from the file || true
bucket_name="mybucket-emlo-mumbai" # Change to your S3 bucket name || true
s3_key="session-10-checkpoint/${{ needs.launch-runner.outputs.commit_id }}/$(basename "$checkpoint_path")" || true # Define S3 key
echo "Uploading $checkpoint_path to s3://$bucket_name/$s3_key" || true
aws s3 cp "$checkpoint_path" "s3://$bucket_name/$s3_key" || true
# Deployment on Huggingface
- name: Deployment on Huggingface
run: |
cd gradio_demo/
set +e
python --version || true
python3 --version || true
Expand Down
Empty file added model_storage/.keep
Empty file.

0 comments on commit 8bab8c8

Please sign in to comment.