mirror of https://github.com/inclusionAI/AReaL
[Fix] Fix CI running condition for lite. (#172)
* . * fix * . * . * fix * fix * fix
This commit is contained in:
parent
8d4b8dc90f
commit
c5f023571e
|
@ -1,7 +1,8 @@
|
||||||
name: Test AReaLite
|
name: Test AReaLite
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
|
branches: [ lite ]
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/test-arealite.yml
|
- .github/workflows/test-arealite.yml
|
||||||
- arealite/**
|
- arealite/**
|
||||||
|
@ -20,11 +21,12 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GIT_REPO_URL: https://github.bibk.top/${{ github.repository }}
|
GIT_REPO_URL: https://github.bibk.top/${{ github.repository }}
|
||||||
GIT_COMMIT_SHA: ${{ github.sha }}
|
GIT_COMMIT_SHA: ${{ github.sha }}
|
||||||
|
CI_NODE_SUDO_PW: ${{ secrets.CI_NODE_SUDO_PW }}
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.CI_NODE_ADDR }}
|
host: ${{ secrets.CI_NODE_ADDR }}
|
||||||
username: ${{ secrets.CI_NODE_USER }}
|
username: ${{ secrets.CI_NODE_USER }}
|
||||||
key: ${{ secrets.REMOTE_SSH_KEY }}
|
key: ${{ secrets.REMOTE_SSH_KEY }}
|
||||||
envs: GIT_REPO_URL,GIT_COMMIT_SHA
|
envs: GIT_REPO_URL,GIT_COMMIT_SHA,CI_NODE_SUDO_PW
|
||||||
script_path: ci/clone_repo.sh
|
script_path: ci/clone_repo.sh
|
||||||
|
|
||||||
- uses: appleboy/ssh-action@v1
|
- uses: appleboy/ssh-action@v1
|
||||||
|
|
|
@ -26,6 +26,8 @@ if not os.path.exists(MODEL_PATH):
|
||||||
PORT = 13887
|
PORT = 13887
|
||||||
DIST_PORT = 15887
|
DIST_PORT = 15887
|
||||||
HOST = network.gethostip()
|
HOST = network.gethostip()
|
||||||
|
# set a large timeout since we may need to download the model from hub
|
||||||
|
RUN_SERVER_TIMEOUT = 180
|
||||||
|
|
||||||
|
|
||||||
def check_server_health(base_url):
|
def check_server_health(base_url):
|
||||||
|
@ -65,11 +67,11 @@ def sglang_server():
|
||||||
)
|
)
|
||||||
base_url = f"http://{HOST}:{PORT}"
|
base_url = f"http://{HOST}:{PORT}"
|
||||||
tik = time.time()
|
tik = time.time()
|
||||||
while time.time() - tik < 90:
|
while time.time() - tik < RUN_SERVER_TIMEOUT:
|
||||||
if check_server_health(base_url):
|
if check_server_health(base_url):
|
||||||
break
|
break
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
if time.time() - tik > 90:
|
if time.time() - tik > RUN_SERVER_TIMEOUT:
|
||||||
raise RuntimeError("server launch failed")
|
raise RuntimeError("server launch failed")
|
||||||
yield
|
yield
|
||||||
process.terminate()
|
process.terminate()
|
||||||
|
|
|
@ -9,7 +9,7 @@ echo "GIT_REPO_URL: $GIT_REPO_URL"
|
||||||
echo "GIT_COMMIT_SHA: $GIT_COMMIT_SHA"
|
echo "GIT_COMMIT_SHA: $GIT_COMMIT_SHA"
|
||||||
|
|
||||||
RUN_ID="areal-$GIT_COMMIT_SHA"
|
RUN_ID="areal-$GIT_COMMIT_SHA"
|
||||||
rm -rf "/tmp/$RUN_ID"
|
echo ${CI_NODE_SUDO_PW} | sudo -S rm -rf "/tmp/$RUN_ID"
|
||||||
mkdir -p "/tmp/$RUN_ID"
|
mkdir -p "/tmp/$RUN_ID"
|
||||||
cd "/tmp/$RUN_ID"
|
cd "/tmp/$RUN_ID"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue