-
Notifications
You must be signed in to change notification settings - Fork 643
84 lines (78 loc) · 2.77 KB
/
backend-pplnn.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: backend-pplnn
on:
push:
paths-ignore:
- "demo/**"
- "tools/**"
pull_request:
paths-ignore:
- "demo/**"
- "tools/**"
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_pplnn_cuda:
runs-on: [self-hosted, linux-3090]
container:
image: openmmlab/mmdeploy:ubuntu20.04-cuda11.3
options: "--gpus=all --ipc=host"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install dependencies
run: |
apt update && apt install unzip wget
python3 -V
python3 -m pip install openmim numpy
python3 -m pip install -r requirements.txt
python3 -m mim install $(cat requirements/codebases.txt | grep mmpretrain)
python3 -m pip list
- name: Build SDK
run: |
bash .github/scripts/linux/build.sh "cuda" "pplnn" \
-Dpplcv_DIR=${pplcv_DIR} \
-Dpplnn_DIR=${pplnn_DIR}
ls build/lib
- name: Install mmdeploy with pplnn
id: badge_status
run: |
rm -rf .eggs && python3 -m pip install -e .
export LD_LIBRARY_PATH="/root/workspace/mmdeploy/build/lib:${LD_LIBRARY_PATH}"
python3 tools/check_env.py
python3 -c 'import mmdeploy.apis.pplnn as pplnn_api; assert pplnn_api.is_available()'
- name: create badge
if: always()
uses: RubbaBoy/[email protected]
with:
NAME: build_pplnn_cuda
LABEL: 'build'
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_pplnn_cpu:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install mmdeploy with pplnn
id: badge_status
run: |
python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu
python -m pip install mmcv-lite protobuf==3.20.2
python tools/scripts/build_ubuntu_x64_pplnn.py 8
python -c 'import mmdeploy.apis.pplnn as pplnn_api; assert pplnn_api.is_available()'
- name: create badge
if: always()
uses: RubbaBoy/[email protected]
with:
NAME: build_pplnn_cpu
LABEL: 'build'
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'blue' || 'red' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}