Skip to content

add workflow file

add workflow file #46

# Autogenerated via deploy.py, do not edit!
name: Docker Build on EC2 Instance for OmniParser
on:
push:
branches:
- feat/deploy6
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: 44.203.222.10
username: ubuntu
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
rm -rf OmniParser || true
git clone https://github.com/OpenAdaptAI/OmniParser
cd OmniParser
git checkout feat/deploy6
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