Skip to content

Commit

Permalink
add workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
abrichr committed Nov 1, 2024
1 parent b8b952c commit a92eefc
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-build-ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Autogenerated via deploy.py, do not edit!

name: Docker Build on EC2 Instance for OmniParser

on:
push:
branches:
- feat/deploy

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: SSH and Execute Build on EC2
uses: appleboy/ssh-action@master
with:
command_timeout: "60m"
host: 3.238.21.15
username: ubuntu

key: ${{ secrets.SSH_PRIVATE_KEY }}

script: |
rm -rf OmniParser || true
git clone https://github.com/OpenAdaptAI/OmniParser
cd OmniParser
git checkout feat/deploy
git pull
# Stop and remove any existing containers
sudo docker stop omniparser-container || true
sudo docker rm omniparser-container || true
# Build the Docker image
sudo nvidia-docker build -t omniparser .
# Run the Docker container on the specified port
sudo docker run -d -p 7861:7861 --gpus all --name omniparser-container omniparser

0 comments on commit a92eefc

Please sign in to comment.