-
Notifications
You must be signed in to change notification settings - Fork 51
71 lines (65 loc) · 2.36 KB
/
Validate-GPU.yml
File metadata and controls
71 lines (65 loc) · 2.36 KB
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
name: Validate-GPU
on:
pull_request:
branches:
- develop
env:
PR_ID: ${{ github.event.pull_request.number }}
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
work_dir: /graphnet
TASK: GraphNet-CI-${{ github.event.pull_request.number }}-Validate
BRANCH: ${{ github.event.pull_request.base.ref }}
CI_name: ci-graphnet-validate
CFS_DIR: /home/data/cfs
no_proxy: "bcebos.com,apiin.im.baidu.com,gitee.com,aliyun.com,.baidu.com,.tuna.tsinghua.edu.cn"
docker_image: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/ci/paddle:4251d0b615371e0d0ed9040d7455e2b4" # cuda11.7
defaults:
run:
shell: bash
jobs:
validate:
name: Validate
if: ${{ inputs.can-skip != 'true' }}
runs-on:
group: BD_BJ-V100
steps:
- name: Check docker image and run container
env:
CACHE_DIR: /home/data/cfs/.cache
run: |
container_name=${TASK}-${core_index}-$(date +%Y%m%d-%H%M%S)
echo "container_name=${container_name}" >> ${{ github.env }}
docker container ls -a --filter "name=GraphNet-CI-*-Validate-${core_index}*" --format "{{.ID}}" | xargs -r docker rm -f
docker run -d -t --gpus all --name ${container_name} --shm-size=128g \
-v "/home/data/cfs:/home/data/cfs" \
-v "/home/data/cfs/.cache:/root/.cache" \
-v "/home/data/cfs/.ccache:/root/.ccache" \
-v "/dev/shm:/dev/shm" \
-v ${{ github.workspace }}/../../..:${{ github.workspace }}/../../.. \
-v ${{ github.workspace }}:/graphnet \
-e python \
-e core_index \
-e BRANCH \
-e PR_ID \
-e COMMIT_ID \
-e work_dir \
-e no_proxy \
-e CI_name \
-e CACHE_DIR \
-e GITHUB_API_TOKEN \
-e CFS_DIR \
-w /graphnet --network host ${docker_image}
- name: Run check
env:
work_dir: ${{ github.workspace }}
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
source ${{ github.workspace }}/../../../proxy
bash ${work_dir}/tools/ci/check_validate.sh
'
- name: Terminate and delete the container
if: always()
run: |
set +e
docker exec -t ${{ env.container_name }} /bin/bash -c 'rm -rf * .[^.]*'
docker rm -f ${{ env.container_name }}