Add Dockerfile and client.py; deploy to EC2 on AWS via Github Actions#52
Add Dockerfile and client.py; deploy to EC2 on AWS via Github Actions#52abrichr wants to merge 39 commits intomicrosoft:masterfrom
Conversation
…-build-ec2.yml.j2; download.py; entrypoint.sh; requirements.txt
Restore requirements.txt
|
@yadong-lu thank you for the excellent work on this repo! I believe this PR is ready to merge. Please let me know if you have any questions/comments! |
|
Hi @abrichr, really appreciate this pr! since it contains a lot of changes, do you think we can keep the changes only for docker and aws deployment. E.g. can we remove the change for gradio_demo.py? Thanks. |
|
@yadong-lu I have reverted
(Without returning You can see the resulting successful Github action here: https://github.com/OpenAdaptAI/OmniParser/actions/runs/11631460372/job/32392578265 Ready for re-review. Edit: if you prefer I can create a new gradio_demo_bboxes.py to use in deploy.py and client.py, and leave the existing gradio_demo.py untouched. Please let me know your preference 🙏 |
…a-docker with docker; improve documentation
This reverts commit 10b08e6.
|
@abrichr I'd also add this to from utils import reader as easyocr_reader
print(f"Downloaded EasyOCR model")
from utils import paddle_ocr
print(f"Downloaded PaddleOCR model")So that it doesn't spend GPUs on that |
|
See OpenAdaptAI/OpenAdapt#943 for an updated version that works independently of Github Actions and is compatible with OmniParser v2 (weights and FastAPI server). @n-sviridenko thank you for the suggestion! Implemented here: OpenAdaptAI/OpenAdapt@6290d17 |

Summary
This PR implements functionality to automatically deploy OmniParser to EC2 on AWS via Docker, Github Actions, and boto3.
It adds a
Dockerfilewhich calls adownload.pyscript for downloading the model weights, adeploy.pywhich automates deployment to AWS EC2 via Github Actions, and a working exampleclient.pythat supports command line usage:And API usage:
It updates the README to include the following section, and another for deploying:
🚀 Docker Quick Start
Prerequisites:
Example successful Github Actions:
Based on microsoft/SoM#19.
Usage Instructions
Or, until this is merged, you can add a new remote to your existing fork:
Requires the following values:
Example output
Deployment:
Redeployment:
Command line client:
Client API:
Status:
Termination:
(Note that all AWS configuration is automated.)