-
Notifications
You must be signed in to change notification settings - Fork 52
107 lines (102 loc) · 3.02 KB
/
test-notebooks.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Test notebooks
on:
workflow_call:
inputs:
BUILD_TYPE:
required: true
type: string
ARCH:
required: true
type: string
GPU:
required: true
type: string
DRIVER:
required: true
type: string
CUDA_VER:
required: true
type: string
PYTHON_VER:
required: true
type: string
NOTEBOOKS_TAG:
required: true
type: string
defaults:
run:
shell: bash
permissions:
actions: read
checks: none
contents: read
deployments: none
discussions: none
id-token: write
issues: none
packages: read
pages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
env:
GHA_TOOLS_DIR: /home/rapids/.local/bin # Workaround for https://github.com/actions/runner/issues/2411
jobs:
test:
strategy:
matrix:
ARCH: ["${{ inputs.ARCH }}"]
CUDA_VER: ["${{ inputs.CUDA_VER }}"]
PYTHON_VER: ["${{ inputs.PYTHON_VER }}"]
GPU: ["${{ inputs.GPU }}"]
DRIVER: ["${{ inputs.DRIVER }}"]
fail-fast: false
runs-on: "linux-${{ inputs.ARCH }}-gpu-${{ inputs.GPU }}-${{ inputs.DRIVER }}-1"
container:
image: ${{ inputs.NOTEBOOKS_TAG }}
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
RAPIDS_BUILD_TYPE: ${{ inputs.BUILD_TYPE }}
RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Install required tools
run: |
mamba install -n base --freeze-installed \
curl \
git
- name: Install gha-tools
run: |
mkdir -p "$GHA_TOOLS_DIR"
curl -s -L 'https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz' | tar -xz -C "$GHA_TOOLS_DIR"
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get RAPIDS GitHub Info
id: get-rapids-github-info
uses: rapidsai/shared-actions/rapids-github-info@main
- name: Print environment
run: |
PATH="$PATH:$GHA_TOOLS_DIR"
rapids-print-env
rapids-logger "nvidia-smi"
nvidia-smi
- name: Test notebooks
run: /home/rapids/test_notebooks.py -i /home/rapids/notebooks -o /home/rapids/notebooks_output
- name: Install awscli
if: '!cancelled()'
run: |
PATH="$PATH:$GHA_TOOLS_DIR"
rapids-mamba-retry install -n base awscli
- uses: aws-actions/configure-aws-credentials@v4
if: '!cancelled()'
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 1800 # 30m
- name: Upload notebook test outputs
if: '!cancelled()'
run: |
PATH="$PATH:$GHA_TOOLS_DIR"
rapids-upload-to-s3 test_notebooks_output_${{ inputs.ARCH }}_cuda${{ inputs.CUDA_VER }}_py${{ inputs.PYTHON_VER }}_${{ inputs.GPU }}-${{ inputs.DRIVER }}.tar.gz /home/rapids/notebooks_output