Skip to content

Commit 10b08e6

Browse files
committed
add workflow file
1 parent 16a4d7a commit 10b08e6

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Autogenerated via deploy.py, do not edit!
2+
3+
name: Docker Build on EC2 Instance for OmniParser
4+
5+
on:
6+
push:
7+
branches:
8+
- feat/deploy
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: SSH and Execute Build on EC2
18+
uses: appleboy/ssh-action@master
19+
with:
20+
command_timeout: "60m"
21+
host: 44.220.85.134
22+
username: ubuntu
23+
24+
key: ${{ secrets.SSH_PRIVATE_KEY }}
25+
26+
script: |
27+
rm -rf OmniParser || true
28+
git clone https://github.com/OpenAdaptAI/OmniParser
29+
cd OmniParser
30+
git checkout feat/deploy
31+
git pull
32+
33+
# Stop and remove any existing containers
34+
sudo docker stop omniparser-container || true
35+
sudo docker rm omniparser-container || true
36+
37+
# Build the Docker image
38+
sudo docker build -t omniparser .
39+
40+
# Run the Docker container on the specified port
41+
sudo docker run -d -p 7861:7861 --gpus all --name omniparser-container omniparser

0 commit comments

Comments
 (0)